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