public User saveTestUser(String name) throws Exception { final User user = new User(name + "@pleasedontsendmailshere.com", name, "secret", "test", "test", true); user.setCompanyName("enwida.de"); userService.saveUser(user, false); return user; }
public User saveUserWithGroup(String username) throws Exception { final User user = new User("*****@*****.**", username, "secret", "test", "test", true); user.setCompanyName("enwida.de"); userService.saveUser(user, false); final Group group = new Group("testgroup"); userService.saveGroup(group); userService.assignGroupToUser(user, group); return user; }