@Test
public void testGetTaskDef() {

    TaskDef taskDef = new TaskDef();
    taskDef.setName("test");
    taskDef.setDescription("desc");
    when(mockMetadataService.getTaskDef(anyString())).thenReturn(taskDef);
    assertEquals(taskDef, metadataResource.getTaskDef("test"));
}