@Test
public void testGetPatientLatestEncounterInvalidEncounterStatus()
{

  expectedException.expect(SystemException.class);
  expectedException.expectMessage(
      "FHIR validation failed - Invalid Encounter.status: cancelled");
  final Bundle result = new Bundle();
  final Bundle.Entry entry = getEncounterResultBundleEntry(
      "encounter1",
      "patient1",
      EncounterClassEnum.INPATIENT,
      EncounterStateEnum.CANCELLED,
      new DateTime(2016, 10, 1, 12, 0),
      null,
      null,
      null,
      null,
      null);
  result.addEntry(entry);
  mockFhirClientResult(result);
  fhirEncounterProvider.getPatientLatestEncounter("patient1");
}