when(mockTaskService.createTaskQuery()).thenReturn(mockTaskQuery);
}
private void createIdentityMocks() {
// identity
UserQuery sampleUserQuery = mock(UserQuery.class);
GroupQuery sampleGroupQuery = mock(GroupQuery.class);
List<User> mockUsers = new ArrayList<User>();
User mockUser = MockProvider.createMockUser();
mockUsers.add(mockUser);
// user query
when(sampleUserQuery.memberOfGroup(anyString())).thenReturn(sampleUserQuery);
when(sampleUserQuery.list()).thenReturn(mockUsers);
// group query
List<Group> mockGroups = MockProvider.createMockGroups();
when(sampleGroupQuery.groupMember(anyString())).thenReturn(sampleGroupQuery);
when(sampleGroupQuery.orderByGroupName()).thenReturn(sampleGroupQuery);