jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1349031 [1/3] - in /jackrabbit/commons/ocm/trunk: ./ src/test/config/jackrabbit/ src/test/config/jeceira/ src/test/java/org/apache/jackrabbit/ocm/ src/test/java/org/apache/jackrabbit/ocm/manager/atomic/ src/test/java/org/apache/jackrabbit/...
Date Mon, 11 Jun 2012 21:43:30 GMT
Author: ard
Date: Mon Jun 11 21:43:27 2012
New Revision: 1349031

URL: http://svn.apache.org/viewvc?rev=1349031&view=rev
Log:
OCM-59 restructure all unit tests to extend from jackrabbit AbstractJCRTest and run it against in memory repository. Also restructured base classes to be easier to understand. Unit tests now run 4 times as fast

Added:
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AbstractRepositoryTestBase.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationRepositoryTestBase.java
      - copied, changed from r1348119, jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterRepositoryTestBase.java
      - copied, changed from r1342541, jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/NodeUtilTest.java
      - copied, changed from r1343782, jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/NodeUtilTest.java
    jackrabbit/commons/ocm/trunk/src/test/repository/
    jackrabbit/commons/ocm/trunk/src/test/repository/repository.xml
    jackrabbit/commons/ocm/trunk/src/test/resources/repositoryHelperPool.properties
      - copied unchanged from r1348091, rave/sandbox/content-services/rave-jcr-integration/test/src/test/resources/repositoryHelperPool.properties
    jackrabbit/commons/ocm/trunk/src/test/resources/repositoryStubImpl.properties
      - copied, changed from r1348091, rave/sandbox/content-services/rave-jcr-integration/test/src/test/resources/repositoryStubImpl.properties
    jackrabbit/commons/ocm/trunk/src/test/test-config/nodetypes/nodetypes_test1.xml
      - copied, changed from r1348119, jackrabbit/commons/ocm/trunk/src/test/config/jackrabbit/nodetypes_test1.xml
Removed:
    jackrabbit/commons/ocm/trunk/src/test/config/jackrabbit/nodetypes_test1.xml
    jackrabbit/commons/ocm/trunk/src/test/config/jackrabbit/repository.xml
    jackrabbit/commons/ocm/trunk/src/test/config/jeceira/jeceira.xml
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AbstractTestBase.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/nodemanagement/TestBase.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/AllTests.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/NodeUtilTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/RelfectionUtilTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtil.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java
Modified:
    jackrabbit/commons/ocm/trunk/pom.xml
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AllTests.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/AnnotationAutoTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/DigesterAutoTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationAvoidRecursiveLoopTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationCopyMoveTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationRemoveTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSameNameSiblingTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSimpleTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterAvoidRecursiveLoopTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterCopyMoveTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterRemoveTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSameNameSiblingTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSimpleTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/AnnotationBeanDescriptorTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/DigesterBeanDescriptorTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationArrayListTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationDefaultCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationHashMapTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationMultiValueCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationMultiValueWithObjectCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationNTCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationPersonListTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationResidualNodesCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/AnnotationResidualPropertiesCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/BeanReferenceMapConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterArrayListTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterDefaultCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterHashMapTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterMultiValueCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterMultiValueWithObjectCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterNTCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterPersonListTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterResidualNodesCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DigesterResidualPropertiesCollectionConverterImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/enumeration/AnnotationSimpleEnumerationTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/enumeration/DigesterSimpleEnumerationTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/AnnotationInheritanceConcreteClassTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/AnnotationInheritanceHierarchyTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/DigesterInheritanceConcreteClassTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/DigesterInheritanceHierarchyTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/AnnotationConcreteClassTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/AnnotationInterfaceHierarchyTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/DigesterConcreteClassTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/DigesterInterfaceHierarchyTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ListOfInterfaceTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/AnnotationJcrNodeTypeTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/AnnotationJcrPropertyTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/DigesterJcrNodeTypeTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/DigesterJcrPropertyTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/lock/AnnotationLockTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/lock/DigesterLockTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/AnnotationProxyTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/DigesterProxyTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/AnnotationAtomicQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/AnnotationIteratorQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/AnnotationMultiValueQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/AnnotationScopeQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/AnnotationSimpleQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/DigesterAtomicQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/DigesterIteratorQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/DigesterMultiValueQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/DigesterScopeQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/query/DigesterSimpleQueryTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/simplemapping/AnnotationSimpleTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/uuid/AnnotationUuidTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/uuid/DigesterUuidTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/version/AnnotationBasicVersionningTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/version/DigesterBasicVersionningTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImplTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/querymanager/AnnotationQueryManagerTest.java
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/querymanager/DigesterQueryManagerTest.java
    jackrabbit/commons/ocm/trunk/src/test/test-config/nodetypes/custom_nodetypes.xml

Modified: jackrabbit/commons/ocm/trunk/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/pom.xml?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/pom.xml (original)
+++ jackrabbit/commons/ocm/trunk/pom.xml Mon Jun 11 21:43:27 2012
@@ -58,8 +58,37 @@
   <!-- B U I L D                                                              -->
   <!-- ====================================================================== -->
   <build>
+
     <plugins>
       <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>process-test-resources</id>
+            <phase>process-test-resources</phase>
+            <configuration>
+              <target>
+                <copy todir="${project.build.directory}/repository">
+                  <fileset dir="${basedir}/src/test/repository" />
+                </copy>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>ant</groupId>
+            <artifactId>ant-optional</artifactId>
+            <version>1.5.3-1</version>
+          </dependency>
+        </dependencies>
+        <version>1.6</version>
+      </plugin>
+
+      <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
           <target>1.6</target>
@@ -80,6 +109,18 @@
           </execution>
         </executions>
       </plugin>
+
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <systemProperties>
+            <property>
+              <name>org.apache.jackrabbit.repository.home</name>
+              <value>target/repository</value>
+            </property>
+          </systemProperties>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
@@ -138,6 +179,8 @@
       </exclusions>
     </dependency>
 
+
+    <!-- Test -->
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-core</artifactId>
@@ -145,7 +188,13 @@
       <!--<scope>test</scope>-->
     </dependency>
 
-    <!-- Test -->
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-jcr-tests</artifactId>
+      <version>${apache.jackrabbit.version}</version>
+      <scope>test</scope>
+    </dependency>
+
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
@@ -178,4 +227,5 @@
     </url>
   </scm>
 
+
 </project>

Added: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AbstractRepositoryTestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AbstractRepositoryTestBase.java?rev=1349031&view=auto
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AbstractRepositoryTestBase.java (added)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AbstractRepositoryTestBase.java Mon Jun 11 21:43:27 2012
@@ -0,0 +1,221 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.ocm;
+
+import java.io.BufferedOutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Workspace;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.nodetype.NodeTypeManager;
+
+import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
+import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
+import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader;
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
+import org.apache.jackrabbit.ocm.reflection.ReflectionUtils;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractRepositoryTestBase extends AbstractJCRTest {
+
+
+    private final static Logger log = LoggerFactory.getLogger(AbstractRepositoryTestBase.class);
+
+    /** namespace prefix constant */
+    public static final String OCM_NAMESPACE_PREFIX = "ocm";
+
+    public static Repository repository;
+
+    /** namespace constant */
+    public static final String OCM_NAMESPACE = "http://jackrabbit.apache.org/ocm";
+
+    private ObjectContentManager ocm;
+
+    private Session session;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        Session session = createSession();
+
+        registerNamespace(session);
+        registerNodeTypes(session);
+        session.save();
+        session.logout();
+        ocm = createObjectContentManager(getSession());
+    }
+
+    protected abstract ObjectContentManager createObjectContentManager(Session session) throws javax.jcr.RepositoryException;
+
+    public ObjectContentManager getObjectContentManager()
+    {
+        return ocm;
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+        if (session != null) {
+            session.logout();
+        }
+        cleanUpRepisotory();
+        super.tearDown();
+    }
+
+    /**
+     *
+     * @return a readWrite session and creates a new one if this method is called for the first time for this AbstractRepositoryTestBase
+     */
+    protected Session getSession() {
+        if (session != null) {
+            return session;
+        }
+        session = createSession();
+        return session;
+    }
+
+    private Session createSession() {
+        try {
+            return getHelper().getReadWriteSession();
+        } catch (RepositoryException e) {
+            throw new IllegalStateException("Could not get a jcr session", e);
+        }
+    }
+
+    protected  void cleanUpRepisotory()
+    {
+        try
+        {
+            Session session = createSession();
+            NodeIterator nodeIterator = session.getRootNode().getNodes();
+
+            while (nodeIterator.hasNext())
+            {
+                Node node = nodeIterator.nextNode();
+                if (! node.getName().startsWith("jcr:"))
+                {
+                    log.debug("tearDown - remove : " + node.getPath());
+                    node.remove();
+                }
+            }
+            session.save();
+            session.logout();
+        }
+        catch(Exception e)
+        {
+            log.error("cleanUpRepository failed", e);
+        }
+    }
+
+    public void exportDocument(String filePath, String nodePath, boolean skipBinary, boolean noRecurse)
+    {
+        try
+        {
+            BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(filePath));
+            Session session = getSession();
+            session.exportDocumentView(nodePath, os, skipBinary, noRecurse);
+            os.flush();
+            os.close();
+            session.logout();
+        }
+        catch (Exception e)
+        {
+            log.error("Impossible to export the content from : " + nodePath, e);
+        }
+    }
+
+    protected void registerNamespace(final Session session) throws javax.jcr.RepositoryException {
+        log.info("Register namespace");
+        String[] jcrNamespaces = session.getWorkspace().getNamespaceRegistry().getPrefixes();
+        boolean createNamespace = true;
+        for (int i = 0; i < jcrNamespaces.length; i++) {
+            if (jcrNamespaces[i].equals(OCM_NAMESPACE_PREFIX)) {
+                createNamespace = false;
+                log.debug("Jackrabbit OCM namespace exists.");
+            }
+        }
+        if (createNamespace) {
+            session.getWorkspace().getNamespaceRegistry().registerNamespace(OCM_NAMESPACE_PREFIX, OCM_NAMESPACE);
+            log.info("Successfully created Jackrabbit OCM namespace.");
+        }
+
+        if (session.getRootNode() != null) {
+            log.info("Jcr session setup successfull.");
+        }
+    }
+
+    protected void registerNodeTypes(Session session)
+            throws InvalidNodeTypeDefException, javax.jcr.RepositoryException, IOException {
+        InputStream xml = new FileInputStream(
+                "./src/test/test-config/nodetypes/custom_nodetypes.xml");
+
+        // HINT: throws InvalidNodeTypeDefException, IOException
+        QNodeTypeDefinition[] types = NodeTypeReader.read(xml);
+
+        Workspace workspace = session.getWorkspace();
+        NodeTypeManager ntMgr = workspace.getNodeTypeManager();
+        NodeTypeRegistry ntReg = ((NodeTypeManagerImpl) ntMgr).getNodeTypeRegistry();
+
+        for (int j = 0; j < types.length; j++) {
+            QNodeTypeDefinition def = types[j];
+
+            try {
+                ntReg.getNodeTypeDef(def.getName());
+            } catch (NoSuchNodeTypeException nsne) {
+                // HINT: if not already registered than register custom node type
+                ntReg.registerNodeType(def);
+            }
+
+        }
+    }
+
+    protected boolean contains(Collection result, String path, Class objectClass)
+    {
+        Iterator iterator = result.iterator();
+        while (iterator.hasNext())
+        {
+            Object  object = iterator.next();
+            String itemPath = (String)  ReflectionUtils.getNestedProperty(object, "path");
+            if (itemPath.equals(path))
+            {
+                if (object.getClass() == objectClass)
+                {
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
+
+            }
+        }
+        return false;
+    }
+}
\ No newline at end of file

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AllTests.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AllTests.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AllTests.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AllTests.java Mon Jun 11 21:43:27 2012
@@ -49,7 +49,6 @@ public class AllTests {
         suite.addTest(org.apache.jackrabbit.ocm.manager.version.AllTests.buildSuite());
         suite.addTest(org.apache.jackrabbit.ocm.mapper.AllTests.buildSuite());
         suite.addTest(org.apache.jackrabbit.ocm.querymanager.AllTests.buildSuite());
-        suite.addTest(org.apache.jackrabbit.ocm.repository.AllTests.buildSuite());
 
         return suite;
     }

Copied: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationRepositoryTestBase.java (from r1348119, jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java)
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationRepositoryTestBase.java?p2=jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationRepositoryTestBase.java&p1=jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java&r1=1348119&r2=1349031&rev=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/AnnotationRepositoryTestBase.java Mon Jun 11 21:43:27 2012
@@ -19,13 +19,13 @@ package org.apache.jackrabbit.ocm;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.jcr.Repository;
-import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.mapper.Mapper;
 import org.apache.jackrabbit.ocm.mapper.impl.annotation.AnnotationMapperImpl;
-import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 import org.apache.jackrabbit.ocm.testmodel.B;
@@ -44,8 +44,6 @@ import org.apache.jackrabbit.ocm.testmod
 import org.apache.jackrabbit.ocm.testmodel.Page;
 import org.apache.jackrabbit.ocm.testmodel.Paragraph;
 import org.apache.jackrabbit.ocm.testmodel.Residual;
-import org.apache.jackrabbit.ocm.testmodel.Residual.ResidualNodes;
-import org.apache.jackrabbit.ocm.testmodel.Residual.ResidualProperties;
 import org.apache.jackrabbit.ocm.testmodel.Resource;
 import org.apache.jackrabbit.ocm.testmodel.SimpleAnnotedAbstractClass;
 import org.apache.jackrabbit.ocm.testmodel.SimpleAnnotedClass;
@@ -84,111 +82,91 @@ import org.apache.jackrabbit.ocm.testmod
  * @author : <a href="mailto:boni.g@bioimagene.com">Boni Gopalan</a>
  *
  */
-public abstract class AnnotationTestBase extends AbstractTestBase
+public abstract class AnnotationRepositoryTestBase extends AbstractRepositoryTestBase
 {
 
+    @Override
+    protected ObjectContentManager createObjectContentManager(Session session) throws RepositoryException
+    {
+        List<Class> classes = new ArrayList<Class>();
+
+        // Register content classes used by the unit tests
+        classes.add(Atomic.class);
+        classes.add(Default.class);
+        classes.add(A.class);
+        classes.add(B.class);
+        classes.add(C.class);
+        classes.add(D.class);
+        classes.add(DFull.class);
+        classes.add(E.class);
+        classes.add(Page.class);
+        classes.add(Paragraph.class);
+        classes.add(Main.class);
+        classes.add(Element.class);
+        classes.add(MultiValue.class);
+        classes.add(MultiValueWithObjectCollection.class);
+        classes.add(Discriminator.class);
+
+        classes.add(Residual.class);
+        classes.add(Residual.ResidualProperties.class);
+        classes.add(Residual.ResidualNodes.class);
+
+        classes.add(CmsObject.class);
+        classes.add(Content.class);
+        classes.add(Document.class);
+        classes.add(Folder.class);
+        classes.add(CmsObjectImpl.class);
+        classes.add(ContentImpl.class);
+        classes.add(DocumentImpl.class);
+        classes.add(DocumentExtImpl.class);
+        classes.add(DocumentStream.class);
+        classes.add(FolderImpl.class);
+
+        classes.add(Ancestor.class);
+        classes.add(Descendant.class);
+        classes.add(AnotherDescendant.class);
+        classes.add(SubDescendant.class);
+        classes.add(Interface.class);
+        classes.add(AnotherInterface.class);
+
+        classes.add(HierarchyNode.class);
+        classes.add(File.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.Folder.class);
+        classes.add(Resource.class);
+        classes.add(OcmTestProperty.class);
+
+        classes.add(Lockable.class);
+
+        classes.add(org.apache.jackrabbit.ocm.testmodel.proxy.Main.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.proxy.Detail.class);
+
+        classes.add(org.apache.jackrabbit.ocm.testmodel.proxy.NTMain.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.proxy.NTDetail.class);
+
+        classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.A.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.B.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.B2.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.Ancestor.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.Descendant.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.unstructured.UnstructuredParagraph.class);
+        classes.add(org.apache.jackrabbit.ocm.testmodel.unstructured.UnstructuredPage.class);
+
+        classes.add(PressRelease.class);
+        classes.add(Author.class);
+
+        classes.add(SimpleAnnotedAbstractClass.class);
+        classes.add(SimpleAnnotedClass.class);
+        classes.add(SimpleInterface.class);
+        classes.add(Person.class);
+        classes.add(Odyssey.class);
+
+        classes.add(EntityA.class);
+        classes.add(EntityB.class);
+        classes.add(MyInterface.class);
 
-	/**
-	 * <p>
-	 * Defines the test case name for junit.
-	 * </p>
-	 *
-	 * @param testName
-	 *            The test case name.
-	 */
-	public AnnotationTestBase(String testName)
-	{
-		super(testName);
-	}
-
-
-	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
-	{
-		Repository repository = RepositoryUtil.getRepository("repositoryTest");
-		session = RepositoryUtil.login(repository, "superuser", "superuser");
-		List<Class> classes = new ArrayList<Class>();
-
-		// Register content classes used by the unit tests
-		classes.add(Atomic.class);
-		classes.add(Default.class);
-		classes.add(A.class);
-		classes.add(B.class);
-		classes.add(C.class);
-		classes.add(D.class);
-		classes.add(DFull.class);
-		classes.add(E.class);
-		classes.add(Page.class);
-		classes.add(Paragraph.class);
-		classes.add(Main.class);
-		classes.add(Element.class);
-		classes.add(MultiValue.class);
-		classes.add(MultiValueWithObjectCollection.class);
-		classes.add(Discriminator.class);
-
-		classes.add(Residual.class);
-		classes.add(ResidualProperties.class);
-		classes.add(ResidualNodes.class);
-
-		classes.add(CmsObject.class);
-		classes.add(Content.class);
-		classes.add(Document.class);
-		classes.add(Folder.class);
-		classes.add(CmsObjectImpl.class);
-		classes.add(ContentImpl.class);
-		classes.add(DocumentImpl.class);
-		classes.add(DocumentExtImpl.class);
-		classes.add(DocumentStream.class);
-		classes.add(FolderImpl.class);
-
-		classes.add(Ancestor.class);
-		classes.add(Descendant.class);
-		classes.add(AnotherDescendant.class);
-		classes.add(SubDescendant.class);
-		classes.add(Interface.class);
-		classes.add(AnotherInterface.class);
-
-		classes.add(HierarchyNode.class);
-		classes.add(File.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.Folder.class);
-		classes.add(Resource.class);
-		classes.add(OcmTestProperty.class);
-
-		classes.add(Lockable.class);
-
-		classes.add(org.apache.jackrabbit.ocm.testmodel.proxy.Main.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.proxy.Detail.class);
-
-		classes.add(org.apache.jackrabbit.ocm.testmodel.proxy.NTMain.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.proxy.NTDetail.class);
-
-		classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.A.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.B.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.B2.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.Ancestor.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.uuid.Descendant.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.unstructured.UnstructuredParagraph.class);
-		classes.add(org.apache.jackrabbit.ocm.testmodel.unstructured.UnstructuredPage.class);
-
-		classes.add(PressRelease.class);
-		classes.add(Author.class);
-		
-		classes.add(SimpleAnnotedAbstractClass.class);
-		classes.add(SimpleAnnotedClass.class);
-		classes.add(SimpleInterface.class);
-		classes.add(Person.class);
-		classes.add(Odyssey.class);
-		
-		classes.add(EntityA.class); 
-		classes.add(EntityB.class); 
-		classes.add(MyInterface.class);
-		
-		Mapper mapper = new AnnotationMapperImpl(classes);
-		ocm = new ObjectContentManagerImpl(session, mapper);
-
-	}
-
-
-
+        Mapper mapper = new AnnotationMapperImpl(classes);
+        return new ObjectContentManagerImpl(session, mapper);
 
+    }
 
 }
\ No newline at end of file

Copied: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterRepositoryTestBase.java (from r1342541, jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java)
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterRepositoryTestBase.java?p2=jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterRepositoryTestBase.java&p1=jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java&r1=1342541&r2=1349031&rev=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/DigesterRepositoryTestBase.java Mon Jun 11 21:43:27 2012
@@ -16,11 +16,11 @@
  */
 package org.apache.jackrabbit.ocm;
 
-import javax.jcr.Repository;
-import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
-import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
 
 /**
  * Base class for testcases. Provides priviledged access to the jcr test
@@ -30,26 +30,12 @@ import org.apache.jackrabbit.ocm.reposit
  *
  *
  */
-public abstract class DigesterTestBase extends AbstractTestBase
+public abstract class DigesterRepositoryTestBase extends AbstractRepositoryTestBase
 {
 
-	/**
-	 * <p>
-	 * Defines the test case name for junit.
-	 * </p>
-	 *
-	 * @param testName
-	 *            The test case name.
-	 */
-	public DigesterTestBase(String testName)
-	{
-		super(testName);
-	}
-
-
-	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
-	{
-		Repository repository = RepositoryUtil.getRepository("repositoryTest");
+    @Override
+    protected ObjectContentManager createObjectContentManager(Session session) throws RepositoryException
+    {
 		String[] files = { "./src/test/test-config/jcrmapping.xml",
 						   "./src/test/test-config/jcrmapping-proxy.xml",
 						   "./src/test/test-config/jcrmapping-atomic.xml",
@@ -61,8 +47,8 @@ public abstract class DigesterTestBase e
                            "./src/test/test-config/jcrmapping-complex-collections.xml",
                            "./src/test/test-config/jcrmapping-Enum.xml"
 		};
-		session = RepositoryUtil.login(repository, "superuser", "superuser");
-		ocm = new ObjectContentManagerImpl(session, files);
+
+	    return new ObjectContentManagerImpl(session, files);
 		
 	}
 

Copied: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/NodeUtilTest.java (from r1343782, jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/NodeUtilTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/NodeUtilTest.java?p2=jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/NodeUtilTest.java&p1=jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/NodeUtilTest.java&r1=1343782&r2=1349031&rev=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/NodeUtilTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/NodeUtilTest.java Mon Jun 11 21:43:27 2012
@@ -14,10 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.ocm.repository;
+package org.apache.jackrabbit.ocm;
 
 import junit.framework.TestCase;
 
+import org.apache.jackrabbit.ocm.repository.NodeUtil;
+
 /** Testcase for RepositoryUtil.
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java Mon Jun 11 21:43:27 2012
@@ -24,7 +24,7 @@ import java.util.Date;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 import org.slf4j.Logger;
@@ -35,19 +35,10 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class AnnotationAtomicTest extends AnnotationTestBase
+public class AnnotationAtomicTest extends AnnotationRepositoryTestBase
 {
     private final static Logger log = LoggerFactory.getLogger(AnnotationAtomicTest.class);
 
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public AnnotationAtomicTest(String testName) throws Exception
-    {
-        super(testName);
-    }
-
     public static Test suite()
     {
         // All methods starting with "test" will be executed in the test suite.

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java Mon Jun 11 21:43:27 2012
@@ -20,7 +20,7 @@ import javax.jcr.Node;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Default;
 import org.slf4j.Logger;
@@ -29,18 +29,10 @@ import org.slf4j.LoggerFactory;
 /**
  * Test Default value assignement
  */
-public class AnnotationDefaultValueTest extends AnnotationTestBase
+public class AnnotationDefaultValueTest extends AnnotationRepositoryTestBase
 {
     private final static Logger log = LoggerFactory.getLogger(AnnotationDefaultValueTest.class);
 
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public AnnotationDefaultValueTest(String testName) throws Exception
-    {
-        super(testName);
-    }
 
     public static Test suite()
     {

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java Mon Jun 11 21:43:27 2012
@@ -23,7 +23,7 @@ import java.util.Date;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 import org.slf4j.Logger;
@@ -34,18 +34,10 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class AnnotationNullAtomicTest extends AnnotationTestBase
+public class AnnotationNullAtomicTest extends AnnotationRepositoryTestBase
 {
     private final static Logger log = LoggerFactory.getLogger(AnnotationNullAtomicTest.class);
 
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public AnnotationNullAtomicTest(String testName)
-    {
-        super(testName);
-    }
 
     public static Test suite()
     {

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java Mon Jun 11 21:43:27 2012
@@ -24,7 +24,7 @@ import java.util.Date;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 import org.slf4j.Logger;
@@ -35,18 +35,10 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class DigesterAtomicTest extends DigesterTestBase
+public class DigesterAtomicTest extends DigesterRepositoryTestBase
 {
     private final static Logger log = LoggerFactory.getLogger(DigesterAtomicTest.class);
 
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public DigesterAtomicTest(String testName) throws Exception
-    {
-        super(testName);
-    }
 
     public static Test suite()
     {

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java Mon Jun 11 21:43:27 2012
@@ -20,28 +20,15 @@ import javax.jcr.Node;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Default;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Test Default value assignement
  */
-public class DigesterDefaultValueTest extends DigesterTestBase
+public class DigesterDefaultValueTest extends DigesterRepositoryTestBase
 {
-    private final static Logger log = LoggerFactory.getLogger(DigesterDefaultValueTest.class);
-
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public DigesterDefaultValueTest(String testName) throws Exception
-    {
-        super(testName);
-    }
-
     public static Test suite()
     {
         // All methods starting with "test" will be executed in the test suite.

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java Mon Jun 11 21:43:27 2012
@@ -23,29 +23,17 @@ import java.util.Date;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Test Atomic perisstence fields
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class DigesterNullAtomicTest extends DigesterTestBase
+public class DigesterNullAtomicTest extends DigesterRepositoryTestBase
 {
-    private final static Logger log = LoggerFactory.getLogger(DigesterNullAtomicTest.class);
-
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public DigesterNullAtomicTest(String testName)
-    {
-        super(testName);
-    }
 
     public static Test suite()
     {

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/AnnotationAutoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/AnnotationAutoTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/AnnotationAutoTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/AnnotationAutoTest.java Mon Jun 11 21:43:27 2012
@@ -19,17 +19,16 @@ package org.apache.jackrabbit.ocm.manage
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.jcr.Repository;
-import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.mapper.Mapper;
 import org.apache.jackrabbit.ocm.mapper.impl.annotation.AnnotationMapperImpl;
-import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
 import org.apache.jackrabbit.ocm.testmodel.auto.CmsObject;
 import org.apache.jackrabbit.ocm.testmodel.auto.Content;
 import org.apache.jackrabbit.ocm.testmodel.auto.Document;
@@ -39,25 +38,13 @@ import org.apache.jackrabbit.ocm.testmod
 import org.apache.jackrabbit.ocm.testmodel.auto.impl.DocumentImpl;
 import org.apache.jackrabbit.ocm.testmodel.auto.impl.DocumentStream;
 import org.apache.jackrabbit.ocm.testmodel.auto.impl.FolderImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Test autoupdate setting
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class AnnotationAutoTest extends AnnotationTestBase {
-	private final static Logger log = LoggerFactory.getLogger(AnnotationAutoTest.class);
-
-	/**
-	 * <p>Defines the test case name for junit.</p>
-	 * @param testName The test case name.
-	 */
-	public AnnotationAutoTest(String testName) throws Exception {
-		super(testName);
-
-	}
+public class AnnotationAutoTest extends AnnotationRepositoryTestBase {
 
 	public static Test suite() {
 		// All methods starting with "test" will be executed in the test suite.
@@ -143,11 +130,10 @@ public class AnnotationAutoTest extends 
 		
 		
 	}
-	
-	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
+
+    @Override
+	protected ObjectContentManager createObjectContentManager(Session session) throws RepositoryException
 	{
-		Repository repository = RepositoryUtil.getRepository("repositoryTest");	
-		session = RepositoryUtil.login(repository, "superuser", "superuser");
 		List<Class> classes = new ArrayList<Class>();
 		
 		classes.add(CmsObject.class);
@@ -160,8 +146,7 @@ public class AnnotationAutoTest extends 
 		classes.add(DocumentImpl.class);
 		
 		Mapper mapper = new AnnotationMapperImpl(classes);
-		ocm = new ObjectContentManagerImpl(session, mapper);
+		return new ObjectContentManagerImpl(session, mapper);
 
-		
 	}	
 }
\ No newline at end of file

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/DigesterAutoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/DigesterAutoTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/DigesterAutoTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/auto/DigesterAutoTest.java Mon Jun 11 21:43:27 2012
@@ -19,39 +19,26 @@ package org.apache.jackrabbit.ocm.manage
 //import javax.jcr.Repository;
 //import javax.jcr.UnsupportedRepositoryOperationException;
 
-import javax.jcr.Repository;
-import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
-import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
 import org.apache.jackrabbit.ocm.testmodel.auto.Document;
 import org.apache.jackrabbit.ocm.testmodel.auto.Folder;
 import org.apache.jackrabbit.ocm.testmodel.auto.impl.DocumentImpl;
 import org.apache.jackrabbit.ocm.testmodel.auto.impl.DocumentStream;
 import org.apache.jackrabbit.ocm.testmodel.auto.impl.FolderImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Test autoupdate setting
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class DigesterAutoTest extends DigesterTestBase {
-	private final static Logger log = LoggerFactory.getLogger(DigesterAutoTest.class);
-
-	/**
-	 * <p>Defines the test case name for junit.</p>
-	 * @param testName The test case name.
-	 */
-	public DigesterAutoTest(String testName) throws Exception {
-		super(testName);
-
-	}
+public class DigesterAutoTest extends DigesterRepositoryTestBase {
 
 	public static Test suite() {
 		// All methods starting with "test" will be executed in the test suite.
@@ -137,13 +124,12 @@ public class DigesterAutoTest extends Di
 		
 		
 	}
-	
-	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
+
+    @Override
+	protected ObjectContentManager createObjectContentManager(Session session) throws RepositoryException
 	{
-		Repository repository = RepositoryUtil.getRepository("repositoryTest");
 		String[] files = {"./src/test/test-config/jcrmapping-auto.xml"};
-		session = RepositoryUtil.login(repository, "superuser", "superuser");
-		ocm = new ObjectContentManagerImpl(session, files);
+		return new ObjectContentManagerImpl(session, files);
 		
 	}	
 }
\ No newline at end of file

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationAvoidRecursiveLoopTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationAvoidRecursiveLoopTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationAvoidRecursiveLoopTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationAvoidRecursiveLoopTest.java Mon Jun 11 21:43:27 2012
@@ -20,21 +20,18 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
-import javax.jcr.Repository;
-import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.mapper.Mapper;
 import org.apache.jackrabbit.ocm.mapper.impl.annotation.AnnotationMapperImpl;
-import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
 import org.apache.jackrabbit.ocm.testmodel.crossreference.A;
 import org.apache.jackrabbit.ocm.testmodel.crossreference.B;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -44,19 +41,8 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@gmail.com>Christophe Lombart</a>
  */
-public class AnnotationAvoidRecursiveLoopTest extends AnnotationTestBase
+public class AnnotationAvoidRecursiveLoopTest extends AnnotationRepositoryTestBase
 {
-    private final static Logger log = LoggerFactory.getLogger(AnnotationAvoidRecursiveLoopTest.class);
-
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public AnnotationAvoidRecursiveLoopTest(String testName)  throws Exception
-    {
-        super(testName);
-    }
-
     public static Test suite()
     {
         // All methods starting with "test" will be executed in the test suite.
@@ -132,19 +118,15 @@ public class AnnotationAvoidRecursiveLoo
 
     }
 
-	
-	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
+	@Override
+	protected ObjectContentManager createObjectContentManager(Session session) throws RepositoryException
 	{
-		Repository repository = RepositoryUtil.getRepository("repositoryTest");	
-		session = RepositoryUtil.login(repository, "superuser", "superuser");
 		List<Class> classes = new ArrayList<Class>();
-		
 		classes.add(B.class);
 		classes.add(A.class);		
 		Mapper mapper = new AnnotationMapperImpl(classes);
-		ocm = new ObjectContentManagerImpl(session, mapper);
+        return new ObjectContentManagerImpl(session, mapper);
 
-		
 	}	
 
 

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationCopyMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationCopyMoveTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationCopyMoveTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationCopyMoveTest.java Mon Jun 11 21:43:27 2012
@@ -22,14 +22,13 @@ import java.util.Collection;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.exception.ObjectContentManagerException;
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 import org.apache.jackrabbit.ocm.testmodel.B;
 import org.apache.jackrabbit.ocm.testmodel.C;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -37,19 +36,8 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class AnnotationCopyMoveTest extends AnnotationTestBase
+public class AnnotationCopyMoveTest extends AnnotationRepositoryTestBase
 {
-	private final static Logger log = LoggerFactory.getLogger(AnnotationCopyMoveTest.class);
-	
-	/**
-	 * <p>Defines the test case name for junit.</p>
-	 * @param testName The test case name.
-	 */
-	public AnnotationCopyMoveTest(String testName) throws Exception
-	{
-		super(testName);
-
-	}
 
 	public static Test suite()
 	{
@@ -70,7 +58,7 @@ public class AnnotationCopyMoveTest exte
 
 	public void testCopy()
 	{
-
+        ObjectContentManager ocm = getObjectContentManager();
         // --------------------------------------------------------------------------------
         // Create and store an object graph in the repository
         // --------------------------------------------------------------------------------
@@ -155,6 +143,7 @@ public class AnnotationCopyMoveTest exte
 	{
 
         try {
+            ObjectContentManager ocm = getObjectContentManager();
 			// --------------------------------------------------------------------------------
 			// Create and store an object graph in the repository
 			// --------------------------------------------------------------------------------
@@ -220,6 +209,7 @@ public class AnnotationCopyMoveTest exte
 	{
 
         try {
+            ObjectContentManager ocm = getObjectContentManager();
 			// --------------------------------------------------------------------------------
 			// Create and store an object graph in the repository
 			// --------------------------------------------------------------------------------

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationRemoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationRemoveTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationRemoveTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationRemoveTest.java Mon Jun 11 21:43:27 2012
@@ -25,14 +25,12 @@ import java.util.Date;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.query.Filter;
 import org.apache.jackrabbit.ocm.query.Query;
 import org.apache.jackrabbit.ocm.query.QueryManager;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -40,19 +38,10 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class AnnotationRemoveTest extends AnnotationTestBase
+public class AnnotationRemoveTest extends AnnotationRepositoryTestBase
 {
-	private final static Logger log = LoggerFactory.getLogger(AnnotationRemoveTest.class);
 	private Date date = new Date();
-	/**
-	 * <p>Defines the test case name for junit.</p>
-	 * @param testName The test case name.
-	 */
-	public AnnotationRemoveTest(String testName) throws Exception
-	{
-		super(testName);
 
-	}
 
 	public static Test suite()
 	{
@@ -84,7 +73,7 @@ public class AnnotationRemoveTest extend
 
 			assertFalse("Test5 has not been removed", ocm.objectExists("/test5"));
 
-			QueryManager queryManager = this.getQueryManager();
+			QueryManager queryManager = getObjectContentManager().getQueryManager();
 			Filter filter = queryManager.createFilter(Atomic.class);
 			filter.addEqualTo("booleanObject" , new Boolean(false));
 			Query query = queryManager.createQuery(filter);

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSameNameSiblingTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSameNameSiblingTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSameNameSiblingTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSameNameSiblingTest.java Mon Jun 11 21:43:27 2012
@@ -22,43 +22,30 @@ import java.util.Calendar;
 import java.util.Collection;
 import java.util.Date;
 
-import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.query.Filter;
 import org.apache.jackrabbit.ocm.query.Query;
 import org.apache.jackrabbit.ocm.query.QueryManager;
-import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 import org.apache.jackrabbit.ocm.testmodel.Page;
 import org.apache.jackrabbit.ocm.testmodel.Paragraph;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Test Query on atomic fields
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class AnnotationSameNameSiblingTest extends AnnotationTestBase
+public class AnnotationSameNameSiblingTest extends AnnotationRepositoryTestBase
 {
-	private final static Logger log = LoggerFactory.getLogger(AnnotationSameNameSiblingTest.class);
 	private Date date = new Date();
-	
-	/**
-	 * <p>Defines the test case name for junit.</p>
-	 * @param testName The test case name.
-	 */
-	public AnnotationSameNameSiblingTest(String testName) throws Exception
-	{
-		super(testName);
-		
-	}
 
 	public static Test suite()
 	{
@@ -76,7 +63,7 @@ public class AnnotationSameNameSiblingTe
 			ObjectContentManager ocm = this.getObjectContentManager();
 				
 			// Query all objects
-			QueryManager queryManager = this.getQueryManager();
+			QueryManager queryManager = ocm.getQueryManager();
 			Filter filter = queryManager.createFilter(Atomic.class);	
 			filter.setScope("/");
 			Query query = queryManager.createQuery(filter);
@@ -96,7 +83,7 @@ public class AnnotationSameNameSiblingTe
             ocm.save();
 
             // Query on the attribute "string"
-            queryManager = this.getQueryManager();
+            queryManager = ocm.getQueryManager();
 			filter = queryManager.createFilter(Atomic.class);	
 			filter.addLike("string", "Modified%");			
 			query = queryManager.createQuery(filter);
@@ -108,7 +95,7 @@ public class AnnotationSameNameSiblingTe
 			assertTrue("Incorrect Object", atomic.getString().equals("Modified Test String 10"));
 			
             // Delete all objects
-            queryManager = this.getQueryManager();
+            queryManager = ocm.getQueryManager();
 			filter = queryManager.createFilter(Atomic.class);	
 			filter.setScope("/");
 			query = queryManager.createQuery(filter) ;
@@ -216,14 +203,12 @@ public class AnnotationSameNameSiblingTe
 
 	}
 	
-	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
+    @Override
+	protected ObjectContentManager createObjectContentManager(Session session) throws RepositoryException
 	{
-		Repository repository = RepositoryUtil.getRepository("repositoryTest");
 		String[] files = { "./src/test/test-config/jcrmapping-sibling.xml" };
-		session = RepositoryUtil.login(repository, "superuser", "superuser");
 
-		
-		ocm = new ObjectContentManagerImpl(session, files);
+		return new ObjectContentManagerImpl(session, files);
 		
 	}	
 	

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSimpleTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSimpleTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSimpleTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/AnnotationSimpleTest.java Mon Jun 11 21:43:27 2012
@@ -22,32 +22,20 @@ import java.util.Collection;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.B;
 import org.apache.jackrabbit.ocm.testmodel.C;
 import org.apache.jackrabbit.ocm.testmodel.Discriminator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Test JcrSession
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class AnnotationSimpleTest extends AnnotationTestBase
+public class AnnotationSimpleTest extends AnnotationRepositoryTestBase
 {
-    private final static Logger log = LoggerFactory.getLogger(AnnotationSimpleTest.class);
-
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public AnnotationSimpleTest(String testName)  throws Exception
-    {
-        super(testName);
-    }
 
     public static Test suite()
     {

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterAvoidRecursiveLoopTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterAvoidRecursiveLoopTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterAvoidRecursiveLoopTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterAvoidRecursiveLoopTest.java Mon Jun 11 21:43:27 2012
@@ -18,19 +18,17 @@ package org.apache.jackrabbit.ocm.manage
 
 import java.util.Collection;
 
-import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
-import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
 import org.apache.jackrabbit.ocm.testmodel.crossreference.A;
 import org.apache.jackrabbit.ocm.testmodel.crossreference.B;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -40,18 +38,8 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@gmail.com>Christophe Lombart</a>
  */
-public class DigesterAvoidRecursiveLoopTest extends DigesterTestBase
+public class DigesterAvoidRecursiveLoopTest extends DigesterRepositoryTestBase
 {
-    private final static Logger log = LoggerFactory.getLogger(DigesterAvoidRecursiveLoopTest.class);
-
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public DigesterAvoidRecursiveLoopTest(String testName)  throws Exception
-    {
-        super(testName);
-    }
 
     public static Test suite()
     {
@@ -128,14 +116,14 @@ public class DigesterAvoidRecursiveLoopT
 
     }
 
-	
-	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
-	{
-		Repository repository = RepositoryUtil.getRepository("repositoryTest");
+
+
+    @Override
+    protected ObjectContentManager createObjectContentManager(Session session) throws RepositoryException
+    {
 		String[] files = { "./src/test/test-config/jcrmapping-avoidrecursiveloop.xml" };
-		session = RepositoryUtil.login(repository, "superuser", "superuser");
 
-		ocm = new ObjectContentManagerImpl(session, files);
+		return new ObjectContentManagerImpl(session, files);
 		
 	}	
 

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterCopyMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterCopyMoveTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterCopyMoveTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterCopyMoveTest.java Mon Jun 11 21:43:27 2012
@@ -22,14 +22,13 @@ import java.util.Collection;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.exception.ObjectContentManagerException;
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 import org.apache.jackrabbit.ocm.testmodel.B;
 import org.apache.jackrabbit.ocm.testmodel.C;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -37,19 +36,8 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class DigesterCopyMoveTest extends DigesterTestBase
+public class DigesterCopyMoveTest extends DigesterRepositoryTestBase
 {
-	private final static Logger log = LoggerFactory.getLogger(DigesterCopyMoveTest.class);
-	
-	/**
-	 * <p>Defines the test case name for junit.</p>
-	 * @param testName The test case name.
-	 */
-	public DigesterCopyMoveTest(String testName) throws Exception
-	{
-		super(testName);
-
-	}
 
 	public static Test suite()
 	{
@@ -71,6 +59,7 @@ public class DigesterCopyMoveTest extend
 	public void testCopy()
 	{
 
+        ObjectContentManager ocm = getObjectContentManager();
         // --------------------------------------------------------------------------------
         // Create and store an object graph in the repository
         // --------------------------------------------------------------------------------
@@ -155,6 +144,7 @@ public class DigesterCopyMoveTest extend
 	{
 
         try {
+            ObjectContentManager ocm = getObjectContentManager();
 			// --------------------------------------------------------------------------------
 			// Create and store an object graph in the repository
 			// --------------------------------------------------------------------------------
@@ -221,6 +211,7 @@ public class DigesterCopyMoveTest extend
 	{
 
         try {
+            ObjectContentManager ocm = getObjectContentManager();
 			// --------------------------------------------------------------------------------
 			// Create and store an object graph in the repository
 			// --------------------------------------------------------------------------------

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterRemoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterRemoveTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterRemoveTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterRemoveTest.java Mon Jun 11 21:43:27 2012
@@ -25,14 +25,12 @@ import java.util.Date;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.query.Filter;
 import org.apache.jackrabbit.ocm.query.Query;
 import org.apache.jackrabbit.ocm.query.QueryManager;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -40,19 +38,9 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class DigesterRemoveTest extends DigesterTestBase
+public class DigesterRemoveTest extends DigesterRepositoryTestBase
 {
-	private final static Logger log = LoggerFactory.getLogger(DigesterRemoveTest.class);
 	private Date date = new Date();
-	/**
-	 * <p>Defines the test case name for junit.</p>
-	 * @param testName The test case name.
-	 */
-	public DigesterRemoveTest(String testName) throws Exception
-	{
-		super(testName);
-
-	}
 
 	public static Test suite()
 	{
@@ -78,13 +66,13 @@ public class DigesterRemoveTest extends 
 		try
 		{
 			
-			ObjectContentManager ocm = this.getObjectContentManager();
+			ObjectContentManager ocm = getObjectContentManager();
 			ocm.remove("/test5");
 			ocm.save();
 
 			assertFalse("Test5 has not been removed", ocm.objectExists("/test5"));
 
-			QueryManager queryManager = this.getQueryManager();
+			QueryManager queryManager = ocm.getQueryManager();
 			Filter filter = queryManager.createFilter(Atomic.class);
 			filter.addEqualTo("booleanObject" , new Boolean(false));
 			Query query = queryManager.createQuery(filter);

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSameNameSiblingTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSameNameSiblingTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSameNameSiblingTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSameNameSiblingTest.java Mon Jun 11 21:43:27 2012
@@ -22,43 +22,30 @@ import java.util.Calendar;
 import java.util.Collection;
 import java.util.Date;
 
-import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.query.Filter;
 import org.apache.jackrabbit.ocm.query.Query;
 import org.apache.jackrabbit.ocm.query.QueryManager;
-import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 import org.apache.jackrabbit.ocm.testmodel.Page;
 import org.apache.jackrabbit.ocm.testmodel.Paragraph;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Test Query on atomic fields
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class DigesterSameNameSiblingTest extends DigesterTestBase
+public class DigesterSameNameSiblingTest extends DigesterRepositoryTestBase
 {
-	private final static Logger log = LoggerFactory.getLogger(DigesterSameNameSiblingTest.class);
 	private Date date = new Date();
-	
-	/**
-	 * <p>Defines the test case name for junit.</p>
-	 * @param testName The test case name.
-	 */
-	public DigesterSameNameSiblingTest(String testName) throws Exception
-	{
-		super(testName);
-		
-	}
 
 	public static Test suite()
 	{
@@ -72,10 +59,10 @@ public class DigesterSameNameSiblingTest
 		try
 		{
 			this.importData(date);
-			ObjectContentManager ocm = this.getObjectContentManager();
+			ObjectContentManager ocm = getObjectContentManager();
 				
 			// Query all objects
-			QueryManager queryManager = this.getQueryManager();
+			QueryManager queryManager = ocm.getQueryManager();
 			Filter filter = queryManager.createFilter(Atomic.class);	
 			filter.setScope("/");
 			Query query = queryManager.createQuery(filter);
@@ -95,7 +82,7 @@ public class DigesterSameNameSiblingTest
             ocm.save();
 
             // Query on the attribute "string"
-            queryManager = this.getQueryManager();
+            queryManager = ocm.getQueryManager();
 			filter = queryManager.createFilter(Atomic.class);	
 			filter.addLike("string", "Modified%");			
 			query = queryManager.createQuery(filter);
@@ -107,7 +94,7 @@ public class DigesterSameNameSiblingTest
 			assertTrue("Incorrect Object", atomic.getString().equals("Modified Test String 10"));
 			
             // Delete all objects
-            queryManager = this.getQueryManager();
+            queryManager = ocm.getQueryManager();
 			filter = queryManager.createFilter(Atomic.class);	
 			filter.setScope("/");
 			query = queryManager.createQuery(filter) ;
@@ -214,15 +201,14 @@ public class DigesterSameNameSiblingTest
 		}
 
 	}
-	
-	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
-	{
-		Repository repository = RepositoryUtil.getRepository("repositoryTest");
+
+
+    @Override
+    protected ObjectContentManager createObjectContentManager(Session session) throws RepositoryException
+    {
 		String[] files = { "./src/test/test-config/jcrmapping-sibling.xml" };
-		session = RepositoryUtil.login(repository, "superuser", "superuser");
 
-		
-		ocm = new ObjectContentManagerImpl(session, files);
+		return new ObjectContentManagerImpl(session, files);
 		
 	}
 

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSimpleTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSimpleTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSimpleTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/basic/DigesterSimpleTest.java Mon Jun 11 21:43:27 2012
@@ -22,32 +22,20 @@ import java.util.Collection;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.B;
 import org.apache.jackrabbit.ocm.testmodel.C;
 import org.apache.jackrabbit.ocm.testmodel.Discriminator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Test JcrSession
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class DigesterSimpleTest extends DigesterTestBase
+public class DigesterSimpleTest extends DigesterRepositoryTestBase
 {
-    private final static Logger log = LoggerFactory.getLogger(DigesterSimpleTest.class);
-
-    /**
-     * <p>Defines the test case name for junit.</p>
-     * @param testName The test case name.
-     */
-    public DigesterSimpleTest(String testName)  throws Exception
-    {
-        super(testName);
-    }
 
     public static Test suite()
     {

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/AnnotationBeanDescriptorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/AnnotationBeanDescriptorTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/AnnotationBeanDescriptorTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/AnnotationBeanDescriptorTest.java Mon Jun 11 21:43:27 2012
@@ -23,7 +23,7 @@ import java.util.List;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.AnnotationTestBase;
+import org.apache.jackrabbit.ocm.AnnotationRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.B;
@@ -32,6 +32,8 @@ import org.apache.jackrabbit.ocm.testmod
 import org.apache.jackrabbit.ocm.testmodel.E;
 import org.apache.jackrabbit.ocm.testmodel.Page;
 import org.apache.jackrabbit.ocm.testmodel.Paragraph;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * ObjectConverter test for bean-descriptor with inner bean inlined and inner bean with
@@ -39,12 +41,10 @@ import org.apache.jackrabbit.ocm.testmod
  *
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
-public class AnnotationBeanDescriptorTest extends AnnotationTestBase {
+public class AnnotationBeanDescriptorTest extends AnnotationRepositoryTestBase {
 
+    private final static Logger log = LoggerFactory.getLogger(AnnotationBeanDescriptorTest.class);
 
-    public AnnotationBeanDescriptorTest(String testname) {
-        super(testname);
-    }
 
     public static Test suite() {
 
@@ -74,6 +74,7 @@ public class AnnotationBeanDescriptorTes
     	
     	try
     	{
+            ObjectContentManager ocm = getObjectContentManager();
     		// ------------------------------------------------------------------------
     		// Create a main object (a) with a null attribute (A.b)
     		// ------------------------------------------------------------------------    		
@@ -121,6 +122,7 @@ public class AnnotationBeanDescriptorTes
     }
     public void testInlined() throws Exception {
 
+        ObjectContentManager ocm = getObjectContentManager();
         B expB = new B();
         expB.setB1("b1value");
         expB.setB2("b2value");
@@ -182,6 +184,7 @@ public class AnnotationBeanDescriptorTes
     public void testBeanDescriptorConverter() throws Exception
     {
 
+        ObjectContentManager ocm = getObjectContentManager();
         B expB = new B();
         expB.setB1("b1value");
         expB.setB2("b2value");

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/DigesterBeanDescriptorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/DigesterBeanDescriptorTest.java?rev=1349031&r1=1349030&r2=1349031&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/DigesterBeanDescriptorTest.java (original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/DigesterBeanDescriptorTest.java Mon Jun 11 21:43:27 2012
@@ -23,7 +23,7 @@ import java.util.List;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.DigesterRepositoryTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.B;
@@ -32,6 +32,8 @@ import org.apache.jackrabbit.ocm.testmod
 import org.apache.jackrabbit.ocm.testmodel.E;
 import org.apache.jackrabbit.ocm.testmodel.Page;
 import org.apache.jackrabbit.ocm.testmodel.Paragraph;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * ObjectConverter test for bean-descriptor with inner bean inlined and inner bean with
@@ -39,12 +41,10 @@ import org.apache.jackrabbit.ocm.testmod
  *
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
-public class DigesterBeanDescriptorTest extends DigesterTestBase {
+public class DigesterBeanDescriptorTest extends DigesterRepositoryTestBase {
 
 
-    public DigesterBeanDescriptorTest(String testname) {
-        super(testname);
-    }
+    private final static Logger log = LoggerFactory.getLogger(DigesterBeanDescriptorTest.class);
 
     public static Test suite() {
 
@@ -75,6 +75,7 @@ public class DigesterBeanDescriptorTest 
 
     	try
     	{
+            ObjectContentManager ocm = getObjectContentManager();
     		// ------------------------------------------------------------------------
     		// Create a main object (a) with a null attribute (A.b)
     		// ------------------------------------------------------------------------
@@ -122,6 +123,7 @@ public class DigesterBeanDescriptorTest 
     }
     public void testInlined() throws Exception {
 
+        ObjectContentManager ocm = getObjectContentManager();
         B expB = new B();
         expB.setB1("b1value");
         expB.setB2("b2value");
@@ -183,6 +185,7 @@ public class DigesterBeanDescriptorTest 
     public void testBeanDescriptorConverter() throws Exception
     {
 
+        ObjectContentManager ocm = getObjectContentManager();
         B expB = new B();
         expB.setB1("b1value");
         expB.setB2("b2value");



Mime
View raw message