assertNotNull( wids );
assertEquals( 1,
wids.size() );
WorkDefinitionImpl wid = (WorkDefinitionImpl) wids.get( "MyTask" );
assertEquals( "MyTask",
wid.getName() );
assertEquals( "My Task",
wid.getDisplayName() );
//Check parameters
assertNotNull( wid.getParameters() );
assertEquals( 7,
wid.getParameters().size() );
assertNotNull( wid.getParameter( "StringParam" ) );
assertNotNull( wid.getParameter( "IntegerParam" ) );
assertNotNull( wid.getParameter( "FloatParam" ) );
assertNotNull( wid.getParameter( "BooleanParam" ) );
assertNotNull( wid.getParameter( "EnumParam" ) );
assertNotNull( wid.getParameter( "ListParam" ) );
assertNotNull( wid.getParameter( "ObjectParam" ) );
assertTrue( wid.getParameter( "StringParam" ).getType() instanceof StringDataType );
assertTrue( wid.getParameter( "IntegerParam" ).getType() instanceof IntegerDataType );
assertTrue( wid.getParameter( "FloatParam" ).getType() instanceof FloatDataType );
assertTrue( wid.getParameter( "BooleanParam" ).getType() instanceof BooleanDataType );
assertTrue( wid.getParameter( "EnumParam" ).getType() instanceof EnumDataType );
assertTrue( wid.getParameter( "ListParam" ).getType() instanceof ListDataType );
assertTrue( wid.getParameter( "ObjectParam" ).getType() instanceof ObjectDataType );
//Check results
assertNotNull( wid.getResults() );
assertEquals( 7,
wid.getResults().size() );
assertNotNull( wid.getResult( "StringResult" ) );
assertNotNull( wid.getResult( "IntegerResult" ) );
assertNotNull( wid.getResult( "FloatResult" ) );
assertNotNull( wid.getResult( "BooleanResult" ) );
assertNotNull( wid.getResult( "EnumResult" ) );
assertNotNull( wid.getResult( "ListResult" ) );
assertNotNull( wid.getResult( "ObjectResult" ) );
assertTrue( wid.getResult( "StringResult" ).getType() instanceof StringDataType );
assertTrue( wid.getResult( "IntegerResult" ).getType() instanceof IntegerDataType );
assertTrue( wid.getResult( "FloatResult" ).getType() instanceof FloatDataType );
assertTrue( wid.getResult( "BooleanResult" ).getType() instanceof BooleanDataType );
assertTrue( wid.getResult( "EnumResult" ).getType() instanceof EnumDataType );
assertTrue( wid.getResult( "ListResult" ).getType() instanceof ListDataType );
assertTrue( wid.getResult( "ObjectResult" ).getType() instanceof ObjectDataType );
} catch ( Exception e ) {
System.out.println( e.getMessage() );
fail( e.getMessage() );
}