@Test
public void testPoll() throws Exception {

    Task task = new Task();
    task.setTaskType("SIMPLE");
    task.setWorkerId("123");
    task.setDomain("test");
    when(mockTaskService.poll(anyString(), anyString(), anyString())).thenReturn(task);
    assertEquals(task, taskResource.poll("SIMPLE", "123", "test"));
}