@Test
public void testView() throws Exception {

    Task task = new Task();
    task.setReferenceTaskName("test");
    List<Task> listOfTask = new ArrayList<>();
    listOfTask.add(task);
    when(mockAdminService.getListOfPendingTask(anyString(), anyInt(), anyInt())).thenReturn(listOfTask);
    assertEquals(listOfTask, adminResource.view("testTask", 0, 100));
}