TYPE_FACTORY.createStructureType();
// set up the type strucutre
final Set fieldTypes = structureType.getMutableFields();
MutableFieldDefinition fieldDefinition =
TYPE_FACTORY.createFieldDefinition("foo");
final MutableStringType stringType = TYPE_FACTORY.createStringType();
fieldDefinition.setType(stringType);
fieldTypes.add(fieldDefinition);
fieldDefinition = TYPE_FACTORY.createFieldDefinition("bar");
final MutableBooleanType booleanType = TYPE_FACTORY.createBooleanType();
fieldDefinition.setType(booleanType);
fieldTypes.add(fieldDefinition);
final MutableFieldDefinition childDefinition =
TYPE_FACTORY.createFieldDefinition("child");
final MutableStructureType childStructureType =
TYPE_FACTORY.createStructureType();
fieldDefinition = TYPE_FACTORY.createFieldDefinition("baz");
final MutableNumberType numberType =
TYPE_FACTORY.createNumberType();
fieldDefinition.setType(numberType);
childStructureType.getMutableFields().add(fieldDefinition);
childDefinition.setType(childStructureType);
fieldTypes.add(childDefinition);
// set up the value strucutre
final MutableStructureValue structureValue =
VALUE_FACTORY.createStructureValue();