@Test public void testBadGet() throws Exception { try { userAdminService.get(-1l); fail("Exception not trapped"); } catch (NotFoundServiceEx e) { LOGGER.info("Exception properly trapped"); } }
@Override public GSUser get(long id) throws NotFoundServiceEx { GSUser user = userDAO.find(id); if (user == null) { throw new NotFoundServiceEx("User not found", id); } return user; }
UserAdminServiceImpl implements UserAdminService { @Override public GSUser get(long id) throws NotFoundServiceEx { GSUser user = userDAO.find(id); if (user == null) { throw new NotFoundServiceEx("User not found", id); } return user; } }
UserAdminServiceImpl implements UserAdminService { @Override public GSUser get(long id) throws NotFoundServiceEx { GSUser user = userDAO.find(id); if (user == null) { throw new NotFoundServiceEx("User not found", id); } return user; }  }
UserAdminServiceImpl implements UserAdminService { @Override public GSUser get(long id) throws NotFoundServiceEx { GSUser user = userDAO.find(id); if (user == null) { throw new NotFoundServiceEx("User not found", id); } return user; }  @Override long insert(GSUser user); @Override long update(GSUser user); @Override GSUser get(long id); @Override GSUser get(String name); @Override GSUser getFull(String name); @Override boolean delete(long id); @Override List<GSUser> getFullList(String nameLike, Integer page, Integer entries); @Override List<GSUser> getFullList(String nameLike, Integer page, Integer entries, boolean fetchGroups); @Override List<ShortUser> getList(String nameLike, Integer page, Integer entries); @Override long getCount(String nameLike); void setGsUserDAO(GSUserDAO userDao); }
UserAdminServiceImpl implements UserAdminService { @Override public GSUser get(long id) throws NotFoundServiceEx { GSUser user = userDAO.find(id); if (user == null) { throw new NotFoundServiceEx("User not found", id); } return user; }  @Override long insert(GSUser user); @Override long update(GSUser user); @Override GSUser get(long id); @Override GSUser get(String name); @Override GSUser getFull(String name); @Override boolean delete(long id); @Override List<GSUser> getFullList(String nameLike, Integer page, Integer entries); @Override List<GSUser> getFullList(String nameLike, Integer page, Integer entries, boolean fetchGroups); @Override List<ShortUser> getList(String nameLike, Integer page, Integer entries); @Override long getCount(String nameLike); void setGsUserDAO(GSUserDAO userDao);  }