@Test
  public void getGeoLevelBoundsForArea_COMMON1() {

    /**
     * Inputs: geography='SAHSU' geoLevelSelect='LEVEL3' studyID=1 mapAreaID='01.008.005600'
     *
     * <p>should yield the results: "(54.5492,-6.56952,54.5205,-6.62246)"
     */
    try {
      User validUser = cloneValidUser();
      StudyResultRetrievalContext validStudyResultRetrievalContext = cloneValidResultContext();
      validStudyResultRetrievalContext.setGeoLevelSelectName("LEVEL3");
      MapArea validMapArea = MapArea.newInstance("01.008.005600", "01.008.005600", "01.008.005600");

      BoundaryRectangle boundaryRectangle =
          rifStudyRetrievalService.getGeoLevelBoundsForArea(
              validUser, validStudyResultRetrievalContext, validMapArea);

      assertEquals("-6.56952", boundaryRectangle.getXMax());
      assertEquals("54.5492", boundaryRectangle.getYMax());
      assertEquals("54.5205", boundaryRectangle.getYMin());
      assertEquals("-6.62246", boundaryRectangle.getXMin());
    } catch (RIFServiceException rifServiceException) {

      fail();
    }
  }
  @Test
  public void getGeoLevelBoundsForArea_NULL3() {
    try {
      User validUser = cloneValidUser();
      StudyResultRetrievalContext validStudyResultRetrievalContext = cloneValidResultContext();
      validStudyResultRetrievalContext.setGeoLevelSelectName("LEVEL3");

      rifStudyRetrievalService.getGeoLevelBoundsForArea(
          validUser, validStudyResultRetrievalContext, null);
    } catch (RIFServiceException rifServiceException) {
      checkErrorType(rifServiceException, RIFServiceError.EMPTY_API_METHOD_PARAMETER, 1);
    }
  }
  @Test
  public void getGeoLevelBoundsForArea_NULL1() {
    try {
      StudyResultRetrievalContext validStudyResultRetrievalContext = cloneValidResultContext();
      validStudyResultRetrievalContext.setGeoLevelSelectName("LEVEL3");
      MapArea validMapArea = MapArea.newInstance("01.008.003500", "01.008.003500", "01.008.003500");

      rifStudyRetrievalService.getGeoLevelBoundsForArea(
          null, validStudyResultRetrievalContext, validMapArea);
      fail();
    } catch (RIFServiceException rifServiceException) {
      checkErrorType(rifServiceException, RIFServiceError.EMPTY_API_METHOD_PARAMETER, 1);
    }
  }
  @Test
  public void getGeoLevelBoundsForArea_MALICIOUS1() {
    try {
      User maliciousUser = cloneMaliciousUser();
      StudyResultRetrievalContext validStudyResultRetrievalContext = cloneValidResultContext();
      validStudyResultRetrievalContext.setGeoLevelSelectName("LEVEL3");
      MapArea validMapArea = MapArea.newInstance("01.008.003500", "01.008.003500", "01.008.003500");

      rifStudyRetrievalService.getGeoLevelBoundsForArea(
          maliciousUser, validStudyResultRetrievalContext, validMapArea);
      fail();
    } catch (RIFServiceException rifServiceException) {
      checkErrorType(rifServiceException, RIFGenericLibraryError.SECURITY_VIOLATION, 1);
    }
  }
  @Test
  public void getGeoLevelBoundsForArea_EMPTY3() {
    try {
      User validUser = cloneValidUser();
      StudyResultRetrievalContext validStudyResultRetrievalContext = cloneValidResultContext();
      validStudyResultRetrievalContext.setGeoLevelSelectName("LEVEL3");
      MapArea emptyMapArea = MapArea.newInstance("", "01.008.003500", "01.008.003500");

      rifStudyRetrievalService.getGeoLevelBoundsForArea(
          validUser, validStudyResultRetrievalContext, emptyMapArea);
      fail();
    } catch (RIFServiceException rifServiceException) {
      checkErrorType(rifServiceException, RIFServiceError.INVALID_MAP_AREA, 1);
    }
  }
  @Test
  public void getGeoLevelFullExtentForStudy_NONEXISTENT2() {

    try {
      User validUser = cloneValidUser();
      StudyResultRetrievalContext nonExistentStudyResultRetrievalContext =
          cloneValidResultContext();
      nonExistentStudyResultRetrievalContext.setStudyID("9998");
      rifStudyRetrievalService.getGeoLevelFullExtentForStudy(
          validUser, nonExistentStudyResultRetrievalContext);
      fail();
    } catch (RIFServiceException rifServiceException) {
      checkErrorType(rifServiceException, RIFServiceError.NON_EXISTENT_DISEASE_MAPPING_STUDY, 1);
    }
  }
  @Test
  public void getGeoLevelFullExtentForStudy_EMPTY2() {

    try {
      User validUser = cloneValidUser();
      StudyResultRetrievalContext emptyStudyResultRetrievalContext = cloneValidResultContext();
      emptyStudyResultRetrievalContext.setStudyID("");
      rifStudyRetrievalService.getGeoLevelFullExtentForStudy(
          validUser, emptyStudyResultRetrievalContext);
      fail();
    } catch (RIFServiceException rifServiceException) {
      checkErrorType(
          rifServiceException, RIFServiceError.INVALID_STUDY_RESULT_RETRIEVAL_CONTEXT, 1);
    }
  }
  @Test
  public void getGeoLevelBoundsForArea_EMPTY2() {
    try {
      User validUser = cloneValidUser();
      StudyResultRetrievalContext emptyStudyResultRetrievalContext = cloneValidResultContext();
      emptyStudyResultRetrievalContext.setStudyID("");
      MapArea validMapArea = MapArea.newInstance("01.008.003500", "01.008.003500", "01.008.003500");

      rifStudyRetrievalService.getGeoLevelBoundsForArea(
          validUser, emptyStudyResultRetrievalContext, validMapArea);
      fail();
    } catch (RIFServiceException rifServiceException) {

      checkErrorType(
          rifServiceException, RIFServiceError.INVALID_STUDY_RESULT_RETRIEVAL_CONTEXT, 1);
    }
  }
  @Test
  public void getGeoLevelFullExtentForStudy_COMMON1() {

    try {
      User validUser = cloneValidUser();
      StudyResultRetrievalContext validStudyResultRetrievalContext = cloneValidResultContext();
      validStudyResultRetrievalContext.setGeoLevelSelectName("LEVEL4");
      System.out.println(
          "Geography=="
              + validStudyResultRetrievalContext.getGeographyName()
              + "==GeoLevelSelect=="
              + validStudyResultRetrievalContext.getGeoLevelSelectName()
              + "==");
      BoundaryRectangle boundaryRectangle =
          rifStudyRetrievalService.getGeoLevelFullExtentForStudy(
              validUser, validStudyResultRetrievalContext);
      assertEquals("-4.88653803", boundaryRectangle.getXMax());
      assertEquals("55.5268097", boundaryRectangle.getYMax());
      assertEquals("52.6875343", boundaryRectangle.getYMin());
      assertEquals("-7.58829451", boundaryRectangle.getXMin());
    } catch (RIFServiceException rifServiceException) {
      fail();
    }
  }