AssignmentManagePage extends AbstractManagePage<Void> { private List<User> getUsers() { return userService.getUsers(UserRole.USER); } AssignmentManagePage(User user);  AssignmentManagePage();  static final String ASSIGNMENT_PANEL_ID; }
@Test public void shouldRender() { UserService userService = mock(UserService.class); getMockContext().putBean("userService", userService); ProjectService projectService = mock(ProjectService.class); getMockContext().putBean("projectService", projectService); CustomerService customerService = mock(CustomerService.class); getMockContext().putBean("customerService", customerService); ProjectAssignmentService assignmentService = mock(ProjectAssignmentService.class); getMockContext().putBean("assignmentService", assignmentService); when(assignmentService.getProjectAssignmentTypes()).thenReturn(new ArrayList<ProjectAssignmentType>()); Customer cust = new Customer(22); List<Customer> custs = new ArrayList<>(); custs.add(cust); when(customerService.getActiveCustomers()).thenReturn(custs); when(userService.getUsers(UserRole.USER)).thenReturn(Arrays.asList(UserObjectMother.createUser())); getTester().startPage(AssignmentManagePage.class); getTester().assertRenderedPage(AssignmentManagePage.class); getTester().assertNoErrorMessage(); }