@Test public void testGetReversed() { List<HistoryDto> historyList = new ArrayList<HistoryDto>(); List<HistoryDto> historyReversedExpected = new ArrayList<HistoryDto>(); HistoryDto hd1 = mock(HistoryDto.class); historyList.add(hd1); HistoryDto hd2 = mock(HistoryDto.class); historyList.add(hd2); HistoryDto hd3 = mock(HistoryDto.class); historyList.add(hd3); historyReversedExpected.add(hd3); historyReversedExpected.add(hd2); historyReversedExpected.add(hd1); List<HistoryDto> historyReversed = pasut.getReversed(historyList); Assert.assertEquals(historyReversedExpected, historyReversed); }
@Override public List<HistoryDto> getReversed(List<HistoryDto> original) { List<HistoryDto> copy = new ArrayList<HistoryDto>(original); Collections.reverse(copy); return copy; }
AuditServiceImpl implements AuditService { @Override public List<HistoryDto> getReversed(List<HistoryDto> original) { List<HistoryDto> copy = new ArrayList<HistoryDto>(original); Collections.reverse(copy); return copy; } }
AuditServiceImpl implements AuditService { @Override public List<HistoryDto> getReversed(List<HistoryDto> original) { List<HistoryDto> copy = new ArrayList<HistoryDto>(original); Collections.reverse(copy); return copy; } AuditServiceImpl(
			EntityManagerFactory entityManagerFactory,
			PatientRepository patientRepository,
			RevisionInfoEntityRepository patientRevisionEntityRepository,
			ModifiedEntityTypeEntityRepository modifiedEntityTypeEntityRepository,
			PatientLegalRepresentativeAssociationRepository patientLegalRepresentativeAssociationRepository,
			StaffRepository staffRepository); }
AuditServiceImpl implements AuditService { @Override public List<HistoryDto> getReversed(List<HistoryDto> original) { List<HistoryDto> copy = new ArrayList<HistoryDto>(original); Collections.reverse(copy); return copy; } AuditServiceImpl(
			EntityManagerFactory entityManagerFactory,
			PatientRepository patientRepository,
			RevisionInfoEntityRepository patientRevisionEntityRepository,
			ModifiedEntityTypeEntityRepository modifiedEntityTypeEntityRepository,
			PatientLegalRepresentativeAssociationRepository patientLegalRepresentativeAssociationRepository,
			StaffRepository staffRepository); @Override List<HistoryDto> findAllHistory(String username); @Override List<HistoryDto> getReversed(List<HistoryDto> original); @Override List<HistoryDto> findHistoryDetails(List<Number> revisions); @Override List<HistoryDto> makeHistoryDtos(); @Override HistoryDto makeHistoryDto(); @Override HistoryDto findHistoryDetail(Number n); List<HistoryDto> findConsentRevokationHistoryByPatient(
			AuditReader reader, long patientId); List<HistoryDto> findConsentSignPDFHistoryByPatient(
			AuditReader reader, long patientId); @Override String findRevType(
			List<ModifiedEntityTypeEntity> modifiedEntityTypeEntitys); @Override String findRevType(Byte btype); @Override String findRevClassName(
			List<ModifiedEntityTypeEntity> modifiedEntityTypeEntitys); @Override List<HistoryDto> findLegalHistoryByPatient(long patientId); @Override List<HistoryDto> findLegalHistoryDetails(List<Number> revisions); @Override HistoryDto findLegalHistoryDetail(Number n); }
AuditServiceImpl implements AuditService { @Override public List<HistoryDto> getReversed(List<HistoryDto> original) { List<HistoryDto> copy = new ArrayList<HistoryDto>(original); Collections.reverse(copy); return copy; } AuditServiceImpl(
			EntityManagerFactory entityManagerFactory,
			PatientRepository patientRepository,
			RevisionInfoEntityRepository patientRevisionEntityRepository,
			ModifiedEntityTypeEntityRepository modifiedEntityTypeEntityRepository,
			PatientLegalRepresentativeAssociationRepository patientLegalRepresentativeAssociationRepository,
			StaffRepository staffRepository); @Override List<HistoryDto> findAllHistory(String username); @Override List<HistoryDto> getReversed(List<HistoryDto> original); @Override List<HistoryDto> findHistoryDetails(List<Number> revisions); @Override List<HistoryDto> makeHistoryDtos(); @Override HistoryDto makeHistoryDto(); @Override HistoryDto findHistoryDetail(Number n); List<HistoryDto> findConsentRevokationHistoryByPatient(
			AuditReader reader, long patientId); List<HistoryDto> findConsentSignPDFHistoryByPatient(
			AuditReader reader, long patientId); @Override String findRevType(
			List<ModifiedEntityTypeEntity> modifiedEntityTypeEntitys); @Override String findRevType(Byte btype); @Override String findRevClassName(
			List<ModifiedEntityTypeEntity> modifiedEntityTypeEntitys); @Override List<HistoryDto> findLegalHistoryByPatient(long patientId); @Override List<HistoryDto> findLegalHistoryDetails(List<Number> revisions); @Override HistoryDto findLegalHistoryDetail(Number n);  }