@Test
public void testBatchPoll() throws Exception{

    Task task = new Task();
    task.setTaskType("SIMPLE");
    task.setWorkerId("123");
    task.setDomain("test");
    List<Task> listOfTasks = new ArrayList<>();
    listOfTasks.add(task);
    when(mockTaskService.batchPoll(anyString(), anyString(), anyString(), anyInt(), anyInt())).thenReturn(listOfTasks);
    assertEquals(listOfTasks, taskResource.batchPoll("SIMPLE", "123",
            "test", 1, 100));
}