@Test
public void testProperty() {

	FileDefinition file = new FileDefinition( new File( "some-file" ));
	BlockProperty block = new BlockProperty( file );
	// Installer
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_INSTALLER, "" );
	Collection<ParsingError> errors = ParsingModelValidator.validate((AbstractBlock) block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_PROPERTY_VALUE, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_INSTALLER, "installerName" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_INSTALLER, "installer-name" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_INSTALLER, "installer.name" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_INSTALLER, "installer#name" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_INSTALLER_NAME, errors.iterator().next().getErrorCode());
	// Children
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_PROPERTY_VALUE, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet1, facet2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet1 , facet2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet1 , facet2, facet3453_, facet-, facet." );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "-facet" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_CHILD_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, ".facet" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_CHILD_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet#" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_CHILD_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet;" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_CHILD_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet with spaces" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_CHILD_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet with	tabs" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_CHILD_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet-with-minus-symbols" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 0, errors.size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_CHILDREN, "facet_with_underscores" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 0, errors.size());
	// Component Facets
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_PROPERTY_VALUE, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "_facet1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet1, facet2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet1 , facet2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet1 , facet2, facet3453_, facet-, facet." );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "-facet" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, ".facet" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "54_facet" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet#" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet;" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet with spaces" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet with special ch@r@cters" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_FACETS, "facet1, , facet2" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_REFERENCED_NAME, errors.iterator().next().getErrorCode());
	// Extended Facets
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_PROPERTY_VALUE, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "_facet1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet1, facet2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet1 , facet2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet1 , facet2, facet3453_, facet-, facet." );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "-facet" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, ".facet" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "54_facet" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet#" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet;" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet with spaces" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet with	tabs and speci@l" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXTENDS, "facet1,,facet2" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_REFERENCED_NAME, errors.iterator().next().getErrorCode());
	// Exported variables
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_PROPERTY_VALUE, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "_var1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1,var2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1 , var2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1=value1, var2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1 = value1 , var2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1, var2 = value2" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1, var2 = value2 , var3" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1, var2 = \"value2\" , var3" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "random[port] var1 , var2 = \"value2\" , var3" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "-var1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, ".var1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "2var1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var#" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var;" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1, var2;" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var1; var2;" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var2, , var1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_VARIABLE_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var2, var1 = \"value1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORT_COMPLEX_VALUE, errors.iterator().next().getErrorCode());
	Assert.assertEquals( "var1", errors.iterator().next().getDetails()[ 0 ].getElementName());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var2, var1 =value1\"" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_EXPORT_COMPLEX_VALUE, errors.iterator().next().getErrorCode());
	Assert.assertEquals( "var1", errors.iterator().next().getDetails()[ 0 ].getElementName());
	block.setNameAndValue( ParsingConstants.PROPERTY_GRAPH_EXPORTS, "var#, var2;" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 2, errors.size());
	for( ParsingError parsingError : errors )
		Assert.assertEquals( ErrorCode.PM_INVALID_EXPORTED_VAR_NAME, parsingError.getErrorCode());
	// Imported variables
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_PROPERTY_VALUE, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "c.var1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "_c.var1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "_c._var1" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "c.var1, c2.var" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "c.var1 , c2.var" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "var1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INCOMPLETE_IMPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "var." );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INCOMPLETE_IMPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "c.var, var1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INCOMPLETE_IMPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "var, var1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 2, errors.size());
	for( ParsingError parsingError : errors )
		Assert.assertEquals( ErrorCode.PM_INCOMPLETE_IMPORTED_VAR_NAME, parsingError.getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "var#" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_IMPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "-var" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_IMPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, ".var" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_IMPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "c.var, var;" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_IMPORTED_VAR_NAME, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, "-var, var!" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 2, errors.size());
	for( ParsingError parsingError : errors )
		Assert.assertEquals( ErrorCode.PM_INVALID_IMPORTED_VAR_NAME, parsingError.getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_COMPONENT_IMPORTS, ", comp.var1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_VARIABLE_NAME, errors.iterator().next().getErrorCode());
	// Count property
	block.setNameAndValue( ParsingConstants.PROPERTY_INSTANCE_COUNT, "" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_PROPERTY_VALUE, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_INSTANCE_COUNT, "a" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_INSTANCE_COUNT, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_INSTANCE_COUNT, "woo" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_INSTANCE_COUNT, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_INSTANCE_COUNT, "-5" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_INSTANCE_COUNT, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_INSTANCE_COUNT, "2.3" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_INVALID_INSTANCE_COUNT, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_INSTANCE_COUNT, "1" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_USELESS_INSTANCE_COUNT, errors.iterator().next().getErrorCode());
	block.setNameAndValue( ParsingConstants.PROPERTY_INSTANCE_COUNT, "3" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	// Instance channel
	block.setNameAndValue( ParsingConstants.PROPERTY_INSTANCE_CHANNELS, "whatever, there is no validation yet" );
	Assert.assertEquals( 0, ParsingModelValidator.validate( block ).size());
	// Invalid property
	block.setNameAndValue( "An Invalid Property", "" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_EMPTY_PROPERTY_VALUE, errors.iterator().next().getErrorCode());
	block.setNameAndValue( "An Invalid Property", "some value" );
	errors = ParsingModelValidator.validate( block );
	Assert.assertEquals( 1, errors.size());
	Assert.assertEquals( ErrorCode.PM_UNKNOWN_PROPERTY_NAME, errors.iterator().next().getErrorCode());
}