### Question:
UserGroupAdminServiceImpl implements UserGroupAdminService { @Override public long getCount(String nameLike) { Search searchCriteria = buildCriteria(null, null, nameLike); return userGroupDAO.count(searchCriteria); }  @Override long insert(ShortGroup group); @Override long update(ShortGroup group); @Override UserGroup get(long id); @Override UserGroup get(String name); @Override boolean delete(long id); @Override List<ShortGroup> getList(String nameLike, Integer page, Integer entries); @Override long getCount(String nameLike); void setUserGroupDAO(UserGroupDAO userGroupDAO);  }### Answer:
@Test public void testGetCount() { assertEquals(0, userGroupAdminService.getCount(null)); createRole("u10"); createRole("u20"); createRole("u30"); UserGroup u99 = createRole("u99"); assertEquals(4, userGroupAdminService.getCount(null)); assertEquals(4, userGroupAdminService.getCount("u%")); assertEquals(3, userGroupAdminService.getCount("%0")); List<ShortGroup> glist = userGroupAdminService.getList("%9",null,null); assertEquals(1, glist.size()); assertEquals("u99", glist.get(0).getName()); assertEquals((Long)u99.getId(), (Long)glist.get(0).getId()); }