PersonalInformationService { public PersonalInformation getEmployeeById(Integer empId) { return repository.findByIdPersonalInformation(empId); } @Autowired  PersonalInformationService(final PersonalInformationRepository repository); PersonalInformation getEmployeeByUserId(Long userId); PersonalInformation getEmployeeById(Integer empId); void createEmployee(PersonalInformation personalInformation);  }
@Test public void getEmployeeByEmpId() { PersonalInformation emp = personalInformationService.getEmployeeById(1); assertNotNull(emp); }