VisitFacadeEjb implements VisitFacade { @Override public List<String> getAllActiveUuids() { User user = userService.getCurrentUser(); if (user == null) { return Collections.emptyList(); } return visitService.getAllActiveUuids(user); }  @Override List<String> getAllActiveUuids(); @Override List<VisitDto> getAllActiveVisitsAfter(Date date); @Override List<VisitDto> getByUuids(List<String> uuids); @Override VisitDto getLastVisitByContact(ContactReferenceDto contactRef); @Override List<VisitDto> getVisitsByContactAndPeriod(ContactReferenceDto contactRef, Date begin, Date end); @Override VisitDto getLastVisitByCase(CaseReferenceDto caseRef); @Override VisitDto getVisitByUuid(String uuid); @Override VisitDto saveVisit(VisitDto dto); @Override ExternalVisitDto saveExternalVisit(final ExternalVisitDto dto); @Override void validate(VisitDto visit); @Override void deleteVisit(String visitUuid); @Override List<VisitIndexDto> getIndexList(VisitCriteria visitCriteria, Integer first, Integer max, List<SortProperty> sortProperties); @Override long count(VisitCriteria visitCriteria); @Override @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) List<VisitExportDto> getVisitsExportList(
		VisitCriteria visitCriteria,
		VisitExportType exportType,
		int first,
		int max,
		ExportConfigurationDto exportConfiguration); Visit fromDto(@NotNull VisitDto source); VisitDto convertToDto(Visit source, Pseudonymizer pseudonymizer); static VisitReferenceDto toReferenceDto(Visit source); static VisitDto toDto(Visit source);  }
@Test public void testGetAllActiveUuids() { TestDataCreator.RDCF rdcf = creator.createRDCF(); UserDto user = creator.createUser(creator.createRDCFEntities(), "Surv", "Sup", UserRole.SURVEILLANCE_SUPERVISOR); PersonDto person = creator.createPerson(); PersonDto person2 = creator.createPerson(); PersonDto person3 = creator.createPerson(); PersonDto person4 = creator.createPerson(); PersonDto person5 = creator.createPerson(); creator.createContact(user.toReference(), person.toReference()); creator.createContact(user.toReference(), person5.toReference()); ContactDto deletedContact = creator.createContact(user.toReference(), person2.toReference()); getContactFacade().deleteContact(deletedContact.getUuid()); creator.createCase(user.toReference(), person.toReference(), rdcf); creator.createCase(user.toReference(), person3.toReference(), rdcf); CaseDataDto deletedCase = creator.createCase(user.toReference(), person4.toReference(), rdcf); getCaseFacade().deleteCase(deletedCase.getUuid()); creator.createVisit(person.toReference()); creator.createVisit(person5.toReference()); creator.createVisit(person3.toReference()); VisitDto visitOfDeletedContact = creator.createVisit(person2.toReference()); VisitDto visitOfDeletedCase = creator.createVisit(person4.toReference()); List<String> visitUuids = getVisitFacade().getAllActiveUuids(); assertThat(visitUuids, hasSize(3)); assertThat(visitUuids, not(contains(visitOfDeletedContact.getUuid()))); assertThat(visitUuids, not(contains(visitOfDeletedCase.getUuid()))); }