private void assertRefinedToLayer(ResourceAttributeDefinition attrDef, LayerType expectedLayer) {
if (expectedLayer == null) {
return;
}
if (!(attrDef instanceof LayerRefinedAttributeDefinition)) {
AssertJUnit.fail("Expected that definition of attribute "+attrDef.getName()+" in layer "+expectedLayer
+" will be LayerRefinedAttributeDefinition, but it is "+attrDef.getClass()+": "+attrDef);
}
assertEquals("Wrong layer in "+attrDef, expectedLayer, ((LayerRefinedAttributeDefinition)attrDef).getLayer());
}