@Test public void shouldReturnUserOnEdit() { User user = controller.edit(1L); assertThat(user, notNullValue()); assertThat(user.getId(), equalTo(1L)); }
@Test public void shouldReturnPage() { Page<User> paginate = controller.index(); List<User> list = paginate.getList(); User user = list.get(0); assertThat(paginate, instanceOf(Page.class)); assertThat(paginate.getPageSize(), equalTo(1)); assertThat(user.getId(), equalTo(1L)); assertThat(user.getEmail(), equalTo("Foo")); }