@Test
public void testValidWorkitemDefinition() throws Exception {

    List<String> defStrings = new ArrayList<>();
    defStrings.add(loadFile("validWorkItemDefinition.wid"));
    Map<String, WorkDefinition> defs = WorkDefinitionsParser.parse(defStrings);
    assertNotNull(defs);
    assertEquals(1,
                 defs.size());
    WorkDefinitionImpl myTaskDef = (WorkDefinitionImpl) defs.get("MyTask");
    assertNotNull(myTaskDef);
    assertEquals("MyTask",
                 myTaskDef.getName());
    assertNotNull(myTaskDef.getParameter("MyFirstParam"));
    assertNotNull(myTaskDef.getParameter("MySecondParam"));
    assertNotNull(myTaskDef.getParameter("MyThirdParam"));
    assertNotNull(myTaskDef.getParameterValues());
    assertEquals(2,
                 myTaskDef.getParameterValues().size());
    Map<String, Object> paramValues = myTaskDef.getParameterValues();
    assertTrue(paramValues.containsKey("MyFirstParam"));
    assertTrue(paramValues.containsKey("MySecondParam"));
    assertNotNull(myTaskDef.getVersion());
    assertEquals("1.0",
                 myTaskDef.getVersion());
    assertNotNull(myTaskDef.getDocumentation());
    assertEquals("documentation for sample workitem",
                 myTaskDef.getDocumentation());
    assertNotNull(myTaskDef.getDescription());
    assertEquals("this is a sample workitem",
                 myTaskDef.getDescription());
    assertNotNull(myTaskDef.getMavenDependencies());
    assertEquals(1,
                 myTaskDef.getMavenDependencies().length);
    assertEquals("org.jboss:somemodule:3.2",
                 myTaskDef.getMavenDependencies()[0]);
}