@Test public void testFindSystemCodesByCategory() { List<SystemCodes> expected = Arrays.asList( new SystemCodes("CATEGORY_1", "KEY_1", "Value 1"), new SystemCodes("CATEGORY_1", "KEY_2", "Value 2")); when(systemCodesDao.findSystemCodesByCategory("CATEGORY_1")).thenReturn(expected); List<SystemCodes> actual = systemCodesService.findSystemCodesByCategory("CATEGORY_1"); verify(systemCodesDao).findSystemCodesByCategory("CATEGORY_1"); assertEquals(expected, actual); }
public List<SystemCodes> findSystemCodesByCategory(String category) { return getSystemCodesDao().findSystemCodesByCategory(category); }
SystemCodesServiceImpl extends BaseCrudServiceImpl<SystemCodes> implements SystemCodesService { public List<SystemCodes> findSystemCodesByCategory(String category) { return getSystemCodesDao().findSystemCodesByCategory(category); } }
SystemCodesServiceImpl extends BaseCrudServiceImpl<SystemCodes> implements SystemCodesService { public List<SystemCodes> findSystemCodesByCategory(String category) { return getSystemCodesDao().findSystemCodesByCategory(category); }  }
SystemCodesServiceImpl extends BaseCrudServiceImpl<SystemCodes> implements SystemCodesService { public List<SystemCodes> findSystemCodesByCategory(String category) { return getSystemCodesDao().findSystemCodesByCategory(category); }  List<String> getAllCategories(); SystemCodes findByKey(SystemCodes systemCodes); SystemCodes findByKey(String systemCodes); List<SystemCodes> findSystemCodesByCategory(String category); List<String> getAllCategoriesExcept(String... categories); SystemCodesDao getSystemCodesDao(); @Override boolean isDuplicateKey(SystemCodes systemCodes); }
SystemCodesServiceImpl extends BaseCrudServiceImpl<SystemCodes> implements SystemCodesService { public List<SystemCodes> findSystemCodesByCategory(String category) { return getSystemCodesDao().findSystemCodesByCategory(category); }  List<String> getAllCategories(); SystemCodes findByKey(SystemCodes systemCodes); SystemCodes findByKey(String systemCodes); List<SystemCodes> findSystemCodesByCategory(String category); List<String> getAllCategoriesExcept(String... categories); SystemCodesDao getSystemCodesDao(); @Override boolean isDuplicateKey(SystemCodes systemCodes);  }