@@ -0,0 +1,2183 @@
+/**%0A * Copyright (c) 2014 Evolveum%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.evolveum.midpoint.schema;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport org.testng.annotations.BeforeSuite;%0Aimport org.xml.sax.SAXException;%0A%0Aimport com.evolveum.midpoint.prism.PrismObjectDefinition;%0Aimport com.evolveum.midpoint.prism.foo.UserType;%0Aimport com.evolveum.midpoint.prism.util.PrismTestUtil;%0Aimport com.evolveum.midpoint.schema.constants.MidPointConstants;%0Aimport com.evolveum.midpoint.util.PrettyPrinter;%0Aimport com.evolveum.midpoint.util.exception.SchemaException;%0A%0A/**%0A * @author semancik%0A *%0A */%0Apublic abstract class AbstractSchemaTest %7B%0A%09%0A%09protected static final File COMMON_DIR = new File(%22src/test/resources/common%22);%0A%09%0A%09public static final File USER_JACK_FILE = new File(COMMON_DIR, %22user-jack.xml%22);%0A%09public static final String USER_JACK_OID = %222f9b9299-6f45-498f-bc8e-8d17c6b93b20%22;%0A%0A%09public static final File ROLE_CONSTRUCTION_FILE = new File(COMMON_DIR, %22role-construction.xml%22);%0A%09public static final String ROLE_CONSTRUCTION_OID = %22cc7dd820-b653-11e3-936d-001e8c717e5b%22;%0A%0A%09@BeforeSuite%0A    public void setup() throws SchemaException, SAXException, IOException %7B%0A        PrettyPrinter.setDefaultNamespacePrefix(MidPointConstants.NS_MIDPOINT_PUBLIC_PREFIX);%0A        PrismTestUtil.resetPrismContext(MidPointPrismContextFactory.FACTORY);%0A    %7D%0A%09%0A%09protected PrismObjectDefinition%3CUserType%3E getUserDefinition() %7B%0A%09%09return PrismTestUtil.getPrismContext().getSchemaRegistry().findObjectDefinitionByCompileTimeClass(UserType.class);%0A%09%7D%0A%09%0A%09protected void displayTestTile(String TEST_NAME) %7B%0A%09%09System.out.println(%22===%5B %22+TEST_NAME+%22 %5D====%22);%0A%09%7D%0A%0A%7D%0A

Work in progress