@Test
public void testFindHistoryDetail() {

	AuditService pasutSpy = spy(pasut);
	Number n = mock(Number.class);
	HistoryDto hd = mock(HistoryDto.class);
	RevisionInfoEntity patientRevisionEntity = mock(RevisionInfoEntity.class);
	@SuppressWarnings("unchecked")
	List<ModifiedEntityTypeEntity> modifiedEntityTypeEntitys = mock(List.class);
	Patient patient = mock(Patient.class);
	when(pasutSpy.makeHistoryDto()).thenReturn(hd);
	when(patientRevisionEntityRepository.findOneById(n)).thenReturn(
			patientRevisionEntity);
	when(
			modifiedEntityTypeEntityRepository
					.findAllByRevision(any(RevisionInfoEntity.class)))
			.thenReturn(modifiedEntityTypeEntitys);
	when(patientRevisionEntity.getUsername()).thenReturn("username");
	when(patientRepository.findByUsername(anyString())).thenReturn(patient);
	when(patient.getLastName()).thenReturn("LastName");
	when(patient.getFirstName()).thenReturn("FirstName");
	when(patientRevisionEntity.getTimestamp()).thenReturn((long) 1);
	pasutSpy.findHistoryDetail(n);
	verify(pasutSpy, times(1)).findRevType(modifiedEntityTypeEntitys);
	verify(pasutSpy, times(1)).findRevClassName(modifiedEntityTypeEntitys);
	verify(hd, times(1)).setRevisionid(anyLong());
	verify(hd, times(1)).setChangedBy(anyString());
	verify(hd, times(1)).setTimestamp(anyString());
	verify(hd, times(1)).setRecType(anyString());
	verify(hd, times(1)).setType(anyString());
}