@Test
public void testGetAllTaskDefs() {

    TaskDef taskDef = new TaskDef();
    taskDef.setName("test");
    taskDef.setDescription("desc");
    List<TaskDef> listOfTaskDefs = new ArrayList<>();
    listOfTaskDefs.add(taskDef);
    when(mockMetadataService.getTaskDefs()).thenReturn(listOfTaskDefs);
    assertEquals(listOfTaskDefs, metadataResource.getTaskDefs());
}