@Before
  public void setup() {

    mockEnvironment = mock(StandardEnvironment.class);

    when(mockEnvironment.getProperty(HmpProperties.JMEADOWS_URL)).thenReturn(url);
    when(mockEnvironment.getProperty(HmpProperties.JMEADOWS_TIMEOUT_MS)).thenReturn("" + timeoutMS);
    when(mockEnvironment.getProperty(HmpProperties.JMEADOWS_USER_NAME)).thenReturn(userName);
    when(mockEnvironment.getProperty(HmpProperties.JMEADOWS_USER_IEN)).thenReturn(userIen);
    when(mockEnvironment.getProperty(HmpProperties.JMEADOWS_USER_SITE_CODE))
        .thenReturn(userSiteCode);
    when(mockEnvironment.getProperty(HmpProperties.JMEADOWS_USER_SITE_NAME))
        .thenReturn(userSiteName);

    this.mockJMeadowsClient = mock(JMeadowsData.class);
    this.jMeadowsAppointmentService =
        new JMeadowsAppointmentService(new JMeadowsConfiguration(mockEnvironment));
    this.jMeadowsAppointmentService.setJMeadowsClient(mockJMeadowsClient);

    user = new User();
    user.setUserIen("test.ien");
    Site hostSite = new Site();
    hostSite.setSiteCode("test.site.code");
    hostSite.setAgency("VA");
    hostSite.setMoniker("test.moniker");
    hostSite.setName("test.site.name");
    user.setHostSite(hostSite);

    patient = new Patient();
    patient.setEDIPI("test.edipi");
  }
  private List<PatientAppointments> createTestData() {

    // create two test Appointments

    Site dodSite = new Site();
    dodSite.setMoniker("DOD");
    dodSite.setSiteCode("DOD");
    dodSite.setName("DOD");

    PatientAppointments appointment1 = new PatientAppointments();

    appointment1.setSourceProtocol(SOURCE_PROTOCOL_DODADAPTER);
    appointment1.setSite(dodSite);
    appointment1.setCdrEventId("123456789");

    PatientAppointments appointment2 = new PatientAppointments();

    appointment2.setSourceProtocol(SOURCE_PROTOCOL_DODADAPTER);
    appointment2.setSite(dodSite);
    appointment2.setCdrEventId("987654321");

    // generate dod status report beans
    PatientAppointments dodStatusReport1 = new PatientAppointments();
    // dodStatusReport1.setAllergyName("status.report.text");
    Site dodStatusSite = new Site();
    dodStatusSite.setMoniker(DOD_STATUS_REPORT_FLAG);
    dodStatusSite.setName(DOD_STATUS_REPORT_FLAG);
    dodStatusSite.setSiteCode(DOD_STATUS_REPORT_FLAG);
    dodStatusReport1.setSite(dodStatusSite);

    // generate connection unavailable bean
    PatientAppointments connectionUnavailable = new PatientAppointments();
    // connectionUnavailable.setAllergyName("Connection unavailable.");
    Site caSite = new Site();
    caSite.setMoniker("DOD");
    caSite.setName("DOD");
    caSite.setAgency("DOD");
    caSite.setSiteCode("DOD");
    connectionUnavailable.setSite(caSite);

    return Arrays.asList(appointment1, appointment2, dodStatusReport1, connectionUnavailable);
  }