public void testSimpleHalTaskQuery() {
String queryName = "name";
// setup user query mock
List<User> mockUsers = MockProvider.createMockUsers();
UserQuery sampleUserQuery = mock(UserQuery.class);
when(sampleUserQuery.listPage(0, 1)).thenReturn(mockUsers);
when(sampleUserQuery.userIdIn(MockProvider.EXAMPLE_TASK_ASSIGNEE_NAME)).thenReturn(sampleUserQuery);
when(sampleUserQuery.userIdIn(MockProvider.EXAMPLE_TASK_OWNER)).thenReturn(sampleUserQuery);
when(sampleUserQuery.count()).thenReturn(1l);
when(processEngine.getIdentityService().createUserQuery()).thenReturn(sampleUserQuery);
// setup process definition query mock
List<ProcessDefinition> mockDefinitions = MockProvider.createMockDefinitions();
ProcessDefinitionQuery sampleProcessDefinitionQuery = mock(ProcessDefinitionQuery.class);