PatientProgram patientProgram = Context.getProgramWorkflowService().getPatientPrograms(patient, workflow.getProgram(), null, null, null, null, false).get(0);
Assert.assertNotNull(patientProgram);
// assert that the patient program only has two states
Assert.assertEquals(2, patientProgram.statesInWorkflow(workflow, false).size());
// verify that the start state
PatientState patientState = getPatientState(patientProgram, startState, FURTHER_PAST_DATE);
Assert.assertNotNull(patientState);
Assert.assertEquals(dateAsString(FURTHER_PAST_DATE), dateAsString(patientState.getStartDate()));