@Test public void testGetById() { int id = 1; User user = service.getById(id); assertNotNull(user); assertEquals(user.getId(), id); }
@Test public void testRegister() throws MovieException { User user = TestUtils.createTestUser(NAME, "pass123", new Date(), NAME + "@email.com"); int accountId = accountService.create(user.getAccount()); user.getAccount().setId(accountId); service.register(user); user = service.getUserByName(NAME); assertTrue(user.getId() > 0); }