@Test
public void test010ParseFromResourceComplex() throws Exception {
final String TEST_NAME = "test010ParseFromResourceComplex";
TestUtil.displayTestTitle(TEST_NAME);
PrismContext prismContext = createInitializedPrismContext();
PrismObject<ResourceType> resource = prismContext.parseObject(RESOURCE_COMPLEX_FILE);
ResourceType resourceType = resource.asObjectable();
TestUtil.displayWhen(TEST_NAME);
RefinedResourceSchema rSchema = RefinedResourceSchemaImpl.parse(resourceType, prismContext);
TestUtil.displayThen(TEST_NAME);
assertNotNull("Refined schema is null", rSchema);
System.out.println("Refined schema");
System.out.println(rSchema.debugDump());
assertRefinedSchema(resourceType, rSchema, null, LayerType.MODEL, true, true);
assertLayerRefinedSchema(resourceType, rSchema, LayerType.SCHEMA, LayerType.SCHEMA, true, true);
assertLayerRefinedSchema(resourceType, rSchema, LayerType.MODEL, LayerType.MODEL, true, true);
assertLayerRefinedSchema(resourceType, rSchema, LayerType.PRESENTATION, LayerType.PRESENTATION, true, true);
RefinedObjectClassDefinition rAccount = rSchema.getRefinedDefinition(ShadowKindType.ACCOUNT, (String)null);
RefinedAttributeDefinition userPasswordAttribute = rAccount.findAttributeDefinition("userPassword");
assertNotNull("No userPassword attribute", userPasswordAttribute);
assertTrue("userPassword not ignored", userPasswordAttribute.isIgnored());
}