@Test public void test_getByDepartmentAndDesignation(){ DepartmentDesignation departmentDesignation = new DepartmentDesignation().builder().departmentCode("code").id(1L).tenantId("default").build(); when(departmentDesignationRepository.findByDepartmentAndDesignation(any(String.class), any(String.class), any(String.class))).thenReturn(departmentDesignation); DepartmentDesignation result = departmentDesignationService.getByDepartmentAndDesignation("dept", "desg", "default"); assertThat(result).isEqualTo(departmentDesignation); }
public DepartmentDesignation getByDepartmentAndDesignation(String departmentCode, String designationCode, String tenantId) { return departmentDesignationRepository.findByDepartmentAndDesignation(departmentCode, designationCode, tenantId); }
DepartmentDesignationService { public DepartmentDesignation getByDepartmentAndDesignation(String departmentCode, String designationCode, String tenantId) { return departmentDesignationRepository.findByDepartmentAndDesignation(departmentCode, designationCode, tenantId); } }
DepartmentDesignationService { public DepartmentDesignation getByDepartmentAndDesignation(String departmentCode, String designationCode, String tenantId) { return departmentDesignationRepository.findByDepartmentAndDesignation(departmentCode, designationCode, tenantId); }  }
DepartmentDesignationService { public DepartmentDesignation getByDepartmentAndDesignation(String departmentCode, String designationCode, String tenantId) { return departmentDesignationRepository.findByDepartmentAndDesignation(departmentCode, designationCode, tenantId); }  DepartmentDesignation getDepartmentDesignation(Long id); DepartmentDesignation getByDepartmentAndDesignation(String departmentCode, String designationCode, String tenantId); void create(DepartmentDesignation departmentDesignation); }
DepartmentDesignationService { public DepartmentDesignation getByDepartmentAndDesignation(String departmentCode, String designationCode, String tenantId) { return departmentDesignationRepository.findByDepartmentAndDesignation(departmentCode, designationCode, tenantId); }  DepartmentDesignation getDepartmentDesignation(Long id); DepartmentDesignation getByDepartmentAndDesignation(String departmentCode, String designationCode, String tenantId); void create(DepartmentDesignation departmentDesignation);  }