@Test public void create() throws NamingException { final UserDAO dao = (UserDAO) container.getContext().lookup("java:global/rest-example/UserDAO"); final User user = dao.create("foo", "dummy", "foo@bar.org"); assertNotNull(dao.find(user.getId())); }
public User create(String name, String pwd, String mail) { User user = new User(); user.setFullname(name); user.setPassword(pwd); user.setEmail(mail); return dao.create(user); }
UserDAO { public User create(String name, String pwd, String mail) { User user = new User(); user.setFullname(name); user.setPassword(pwd); user.setEmail(mail); return dao.create(user); } }
UserDAO { public User create(String name, String pwd, String mail) { User user = new User(); user.setFullname(name); user.setPassword(pwd); user.setEmail(mail); return dao.create(user); }  }
UserDAO { public User create(String name, String pwd, String mail) { User user = new User(); user.setFullname(name); user.setPassword(pwd); user.setEmail(mail); return dao.create(user); }  User create(String name, String pwd, String mail); List<User> list(int first, int max); User find(long id); void delete(long id); User update(long id, String name, String pwd, String mail); }
UserDAO { public User create(String name, String pwd, String mail) { User user = new User(); user.setFullname(name); user.setPassword(pwd); user.setEmail(mail); return dao.create(user); }  User create(String name, String pwd, String mail); List<User> list(int first, int max); User find(long id); void delete(long id); User update(long id, String name, String pwd, String mail);  }