UserRolesDAO { public UserRoles get(Integer id) { Session session = sessionFactory.openSession(); session.beginTransaction(); UserRoles userRoles = (UserRoles) session.get(UserRoles.class, id); session.getTransaction().commit(); session.close(); return userRoles; }  List<UserRoles> list(Integer pageNum, Integer numResults); Map<Integer,String> diffRoleList(); List<UserRoles> listByName(String userName); UserRoles minUserRoleId(String userName); Integer totalRecordCount(); UserRoles get(Integer id); Integer insert(UserRoles userRoles); void update(UserRoles userRoles); void delete(Integer id);  }
@Ignore @Test public void testGet() throws Exception { LOGGER.info("UserRoles(1) role:" + userRolesDAO.get(2).getRole()); }