### Question:
DiagnosisServiceImpl extends BaseOpenmrsService implements DiagnosisService { @Override @Transactional(readOnly = true) public List<Diagnosis> getPrimaryDiagnoses(Encounter encounter) { return diagnosisDAO.getPrimaryDiagnoses(encounter); }  @Override Diagnosis save(Diagnosis diagnosis); @Override Diagnosis voidDiagnosis(Diagnosis diagnosis, String voidReason); @Override Diagnosis getDiagnosisByUuid(String uuid); @Override @Transactional(readOnly = true) List<Diagnosis> getDiagnoses(Patient patient, Date fromDate); @Override @Transactional(readOnly = true) List<Diagnosis> getPrimaryDiagnoses(Encounter encounter); @Override @Transactional(readOnly = true) List<Diagnosis> getUniqueDiagnoses(Patient patient, Date fromDate); @Override @Transactional(readOnly = true) Diagnosis getDiagnosis(Integer diagnosisId); @Override Diagnosis unvoidDiagnosis(Diagnosis diagnosis); @Override void purgeDiagnosis(Diagnosis diagnosis); DiagnosisDAO getDiagnosisDAO(); void setDiagnosisDAO(DiagnosisDAO diagnosisDAO);  }### Answer:
@Test public void getPrimaryDiagnoses_shouldGetPrimaryDiagnoses(){ Encounter encounter = encounterService.getEncounterByUuid("y403fafb-e5e4-42d0-9d11-4f52e89d123r"); List<Diagnosis> diagnoses = diagnosisService.getPrimaryDiagnoses(encounter); Assert.assertEquals(1, diagnoses.size()); Assert.assertEquals("68802cce-6880-17e4-6880-a68804d22fb7", diagnoses.get(0).getUuid()); Assert.assertEquals(ConditionVerificationStatus.CONFIRMED, diagnoses.get(0).getCertainty()); Assert.assertEquals(new Integer(1), diagnoses.get(0).getDiagnosisId()); }