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