You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/01/14 17:38:21 UTC

[5/5] syncope git commit: [SYNCOPE-620] FIT module is in, now time for importing integration tests

[SYNCOPE-620] FIT module is in, now time for importing integration tests


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b015c443
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b015c443
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b015c443

Branch: refs/heads/2_0_X
Commit: b015c443b57c01349b61bc490594626451e5b364
Parents: ad98b98
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jan 14 17:38:08 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jan 14 17:38:08 2015 +0100

----------------------------------------------------------------------
 .../apache/syncope/common/lib/package-info.java |  22 +
 .../syncope/common/lib/search/package-info.java |  23 +
 .../syncope/common/lib/types/package-info.java  |  23 +
 syncope620/common/rest-api/pom.xml              |  14 +
 syncope620/fit/build-tools/pom.xml              | 138 ++++++
 .../fit/buildtools/ApacheDSRootDseServlet.java  |  99 ++++
 .../buildtools/ApacheDSStartStopListener.java   | 277 +++++++++++
 .../fit/buildtools/ConnIdStartStopListener.java | 105 ++++
 .../fit/buildtools/H2StartStopListener.java     |  82 ++++
 .../fit/buildtools/LdifInputStreamLoader.java   | 131 +++++
 .../fit/buildtools/ServiceTimeoutServlet.java   | 105 ++++
 .../src/main/resources/buildToolsContext.xml    |  58 +++
 .../build-tools/src/main/resources/content.ldif |  57 +++
 .../build-tools/src/main/resources/log4j2.xml   |  39 ++
 .../build-tools/src/main/resources/testdb.sql   |  46 ++
 .../build-tools/src/main/webapp/WEB-INF/web.xml |  60 +++
 syncope620/fit/pom.xml                          |  41 ++
 syncope620/fit/reference/pom.xml                | 310 ++++++++++++
 .../src/main/resources/connid.properties        |  18 +
 .../reference/src/main/resources/context.xml    |  23 +
 .../fit/reference/src/main/resources/log4j2.xml | 129 +++++
 .../src/main/resources/serverContext.xml        |  55 +++
 .../reference/src/main/webapp/cacheStats.jsp    | 190 ++++++++
 syncope620/fit/reference/src/main/webapp/db.jsp |  36 ++
 syncope620/pom.xml                              | 178 ++++++-
 syncope620/server/logic/pom.xml                 |   6 +-
 .../syncope/server/logic/ReportLogic.java       |   4 +-
 .../init/ImplementationClassNamesLoader.java    |  11 +-
 .../server/logic/init/JobInstanceLoader.java    | 224 +--------
 .../logic/init/JobInstanceLoaderImpl.java       | 270 +++++++++++
 .../syncope/server/logic/init/LoggerLoader.java |  98 ++++
 .../server/logic/init/LogicInitializer.java     |  73 +++
 .../logic/init/WorkflowAdapterLoader.java       |   9 +-
 .../src/main/resources/report/report2csv.xsl    |  36 ++
 .../src/main/resources/report/report2fo.xsl     |  97 ++++
 .../src/main/resources/report/report2html.xsl   |  77 +++
 .../main/resources/report/roleReportlet2csv.xsl | 118 +++++
 .../main/resources/report/roleReportlet2fo.xsl  | 228 +++++++++
 .../resources/report/roleReportlet2html.xsl     | 196 ++++++++
 .../resources/report/staticReportlet2csv.xsl    |  81 ++++
 .../resources/report/staticReportlet2fo.xsl     |  84 ++++
 .../resources/report/staticReportlet2html.xsl   |  74 +++
 .../main/resources/report/userReportlet2csv.xsl | 119 +++++
 .../main/resources/report/userReportlet2fo.xsl  | 247 ++++++++++
 .../resources/report/userReportlet2html.xsl     | 219 +++++++++
 .../syncope/server/logic/NotificationTest.java  |   1 +
 .../logic/src/test/resources/logicTest.xml      |   5 +-
 syncope620/server/misc/pom.xml                  |  11 +-
 .../misc/src/main/resources/securityContext.xml |  68 +++
 syncope620/server/persistence-api/pom.xml       |   2 +-
 .../server/persistence/api/SyncopeLoader.java   |  35 ++
 .../persistence/api/content/ContentLoader.java  |   4 +-
 syncope620/server/persistence-jpa/pom.xml       |   4 +-
 .../jpa/content/XMLContentLoader.java           |   5 +
 .../jpa/entity/JPAEntityFactory.java            |   3 +
 .../src/main/resources/persistence.properties   |   3 +-
 .../src/main/resources/persistenceContext.xml   |   8 +-
 .../src/test/resources/content.xml              |   8 +-
 .../src/test/resources/persistence.properties   |   3 +-
 syncope620/server/provisioning-api/pom.xml      |   9 +-
 .../provisioning/api/ConnectorFactory.java      |   6 +-
 syncope620/server/provisioning-java/pom.xml     |   8 +-
 .../provisioning/java/ConnectorManager.java     |   5 +
 .../src/main/resources/mail.properties          |   3 +-
 .../src/main/resources/provisioningContext.xml  |   2 +-
 .../server/provisioning/java/AbstractTest.java  |   1 +
 .../src/test/resources/provisioningTest.xml     |   4 +-
 syncope620/server/rest-cxf/pom.xml              |  33 +-
 .../rest/cxf/ThreadLocalCleanupListener.java    |  44 ++
 .../syncope/server/rest/cxf/WADLServlet.java    |  96 ++++
 .../main/resources/META-INF/web-fragment.xml    |  89 ++++
 .../src/main/resources/restCXFContext.xml       |   4 +-
 .../src/main/resources/wadl2html/index.xsl      | 484 +++++++++++++++++++
 .../src/main/resources/wadl2html/schema.xsl     | 148 ++++++
 syncope620/server/workflow-api/pom.xml          |   4 +-
 syncope620/server/workflow-java/pom.xml         |   4 +-
 .../src/main/resources/workflow.properties      |  18 +
 .../src/main/resources/workflowContext.xml      |  28 ++
 78 files changed, 5396 insertions(+), 284 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
new file mode 100644
index 0000000..8eac5d5
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib;
+
+import javax.xml.bind.annotation.XmlSchema;

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
new file mode 100644
index 0000000..ff6b5e7
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.search;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
new file mode 100644
index 0000000..80cb87f
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/common/rest-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/pom.xml b/syncope620/common/rest-api/pom.xml
index 137bfea..967573e 100644
--- a/syncope620/common/rest-api/pom.xml
+++ b/syncope620/common/rest-api/pom.xml
@@ -69,6 +69,20 @@ under the License.
   
   <build>
     <plugins>
+      <!-- Generating javadoc JAR artifact for usage with CXF's WADL generator (for server) -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-javadocs</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/pom.xml b/syncope620/fit/build-tools/pom.xml
new file mode 100644
index 0000000..04bfe8b
--- /dev/null
+++ b/syncope620/fit/build-tools/pom.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.syncope</groupId>
+    <artifactId>syncope-fit</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <name>Apache Syncope FIT Build Tools</name>
+  <description>Apache Syncope FIT Build Tools</description>
+  <groupId>org.apache.syncope.fit</groupId>
+  <artifactId>syncope-fit-build-tools</artifactId>
+  <packaging>war</packaging>
+  
+  <properties>
+    <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+  </properties>
+
+  <dependencies>
+    <dependency> 
+      <groupId>javax.servlet</groupId> 
+      <artifactId>javax.servlet-api</artifactId> 
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-all</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-jdbc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>com.h2database</groupId>
+      <artifactId>h2</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>net.tirasa.connid</groupId>
+      <artifactId>connector-framework</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>net.tirasa.connid</groupId>
+      <artifactId>connector-framework-internal</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>net.tirasa.connid</groupId>
+      <artifactId>slf4j-logging</artifactId>
+    </dependency>
+      
+    <dependency>
+      <groupId>org.codehaus.groovy</groupId>
+      <artifactId>groovy-all</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>net.tirasa.connid.bundles.db</groupId>
+      <artifactId>net.tirasa.connid.bundles.db.table</artifactId>
+      <version>${connid.db.table.version}</version>
+      <scope>runtime</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.lmax</groupId>
+      <artifactId>disruptor</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+      </plugin>
+    </plugins>
+       
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSRootDseServlet.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSRootDseServlet.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSRootDseServlet.java
new file mode 100644
index 0000000..bfdbdde
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSRootDseServlet.java
@@ -0,0 +1,99 @@
+/*
+ * 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.syncope.fit.buildtools;
+
+import java.io.PrintWriter;
+import java.util.Hashtable;
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.directory.server.core.api.DirectoryService;
+import org.apache.directory.server.core.jndi.CoreContextFactory;
+
+public class ApacheDSRootDseServlet extends HttpServlet {
+
+    private static final long serialVersionUID = 1514567335969002735L;
+
+    @Override
+    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException {
+
+        try {
+            resp.setContentType("text/plain");
+            PrintWriter out = resp.getWriter();
+
+            out.println("*** ApacheDS RootDSE ***\n");
+
+            DirContext ctx = new InitialDirContext(this.createEnv());
+
+            SearchControls ctls = new SearchControls();
+            ctls.setReturningAttributes(new String[] { "*", "+" });
+            ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
+
+            NamingEnumeration<SearchResult> result = ctx.search("", "(objectClass=*)", ctls);
+            if (result.hasMore()) {
+                SearchResult entry = result.next();
+                Attributes as = entry.getAttributes();
+
+                NamingEnumeration<String> ids = as.getIDs();
+                while (ids.hasMore()) {
+                    String id = ids.next();
+                    Attribute attr = as.get(id);
+                    for (int i = 0; i < attr.size(); ++i) {
+                        out.println(id + ": " + attr.get(i));
+                    }
+                }
+            }
+            ctx.close();
+
+            out.flush();
+        } catch (Exception e) {
+            throw new ServletException(e);
+        }
+    }
+
+    /**
+     * Creates an environment configuration for JNDI access.
+     */
+    private Hashtable<Object, Object> createEnv() {
+        // Fetch directory service from servlet context
+        ServletContext servletContext = this.getServletContext();
+        DirectoryService directoryService = (DirectoryService) servletContext.getAttribute(DirectoryService.JNDI_KEY);
+
+        Hashtable<Object, Object> env = new Hashtable<>();
+        env.put(DirectoryService.JNDI_KEY, directoryService);
+        env.put(Context.PROVIDER_URL, "");
+        env.put(Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName());
+
+        env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
+        env.put(Context.SECURITY_CREDENTIALS, "secret");
+        env.put(Context.SECURITY_AUTHENTICATION, "simple");
+
+        return env;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java
new file mode 100644
index 0000000..6c2b7b2
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java
@@ -0,0 +1,277 @@
+/*
+ * 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.syncope.fit.buildtools;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.apache.directory.api.ldap.model.schema.registries.SchemaLoader;
+import org.apache.directory.api.ldap.schemaextractor.SchemaLdifExtractor;
+import org.apache.directory.api.ldap.schemaextractor.impl.DefaultSchemaLdifExtractor;
+import org.apache.directory.api.ldap.schemaloader.LdifSchemaLoader;
+import org.apache.directory.api.ldap.schemamanager.impl.DefaultSchemaManager;
+import org.apache.directory.api.util.exception.Exceptions;
+import org.apache.directory.server.constants.ServerDNConstants;
+import org.apache.directory.server.core.DefaultDirectoryService;
+import org.apache.directory.server.core.api.CacheService;
+import org.apache.directory.server.core.api.DirectoryService;
+import org.apache.directory.server.core.api.DnFactory;
+import org.apache.directory.server.core.api.InstanceLayout;
+import org.apache.directory.server.core.api.partition.Partition;
+import org.apache.directory.server.core.api.schema.SchemaPartition;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
+import org.apache.directory.server.core.partition.ldif.LdifPartition;
+import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.protocol.shared.transport.TcpTransport;
+import org.apache.directory.server.xdbm.Index;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.io.Resource;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Start and stop an embedded ApacheDS instance alongside with Servlet Context.
+ */
+public class ApacheDSStartStopListener implements ServletContextListener {
+
+    /**
+     * Logger.
+     */
+    private static final Logger LOG = LoggerFactory.getLogger(ApacheDSStartStopListener.class);
+
+    private DirectoryService service;
+
+    private LdapServer server;
+
+    /**
+     * Add a new partition to the server.
+     *
+     * @param partitionId The partition Id
+     * @param partitionDn The partition DN
+     * @param dnFactory the DN factory
+     * @return The newly added partition
+     * @throws Exception If the partition can't be added
+     */
+    private Partition addPartition(final String partitionId, final String partitionDn, final DnFactory dnFactory)
+            throws Exception {
+
+        // Create a new partition with the given partition id 
+        JdbmPartition partition = new JdbmPartition(service.getSchemaManager(), dnFactory);
+        partition.setId(partitionId);
+        partition.setPartitionPath(new File(service.getInstanceLayout().getPartitionsDirectory(), partitionId).toURI());
+        partition.setSuffixDn(new Dn(partitionDn));
+        service.addPartition(partition);
+
+        return partition;
+    }
+
+    /**
+     * Add a new set of index on the given attributes.
+     *
+     * @param partition The partition on which we want to add index
+     * @param attrs The list of attributes to index
+     */
+    private void addIndex(final Partition partition, final String... attrs) {
+        // Index some attributes on the apache partition
+        Set<Index<?, String>> indexedAttributes = new HashSet<>();
+
+        for (String attribute : attrs) {
+            indexedAttributes.add(new JdbmIndex<String>(attribute, false));
+        }
+
+        ((JdbmPartition) partition).setIndexedAttributes(indexedAttributes);
+    }
+
+    /**
+     * Initialize the schema manager and add the schema partition to directory service.
+     *
+     * @throws Exception if the schema LDIF files are not found on the classpath
+     */
+    private void initSchemaPartition() throws Exception {
+        InstanceLayout instanceLayout = service.getInstanceLayout();
+
+        File schemaPartitionDirectory = new File(instanceLayout.getPartitionsDirectory(), "schema");
+
+        // Extract the schema on disk (a brand new one) and load the registries
+        if (schemaPartitionDirectory.exists()) {
+            LOG.debug("schema partition already exists, skipping schema extraction");
+        } else {
+            SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor(instanceLayout.getPartitionsDirectory());
+            extractor.extractOrCopy();
+        }
+
+        SchemaLoader loader = new LdifSchemaLoader(schemaPartitionDirectory);
+        SchemaManager schemaManager = new DefaultSchemaManager(loader);
+
+        // We have to load the schema now, otherwise we won't be able
+        // to initialize the Partitions, as we won't be able to parse
+        // and normalize their suffix Dn
+        schemaManager.loadAllEnabled();
+
+        List<Throwable> errors = schemaManager.getErrors();
+        if (!errors.isEmpty()) {
+            throw new IllegalStateException(I18n.err(I18n.ERR_317, Exceptions.printErrors(errors)));
+        }
+
+        service.setSchemaManager(schemaManager);
+
+        // Init the LdifPartition with schema
+        LdifPartition schemaLdifPartition = new LdifPartition(schemaManager, service.getDnFactory());
+        schemaLdifPartition.setPartitionPath(schemaPartitionDirectory.toURI());
+
+        // The schema partition
+        SchemaPartition schemaPartition = new SchemaPartition(schemaManager);
+        schemaPartition.setWrappedPartition(schemaLdifPartition);
+        service.setSchemaPartition(schemaPartition);
+    }
+
+    /**
+     * Initialize the server. It creates the partition, adds the index, and injects the context entries for the created
+     * partitions.
+     *
+     * @param workDir the directory to be used for storing the data
+     * @param loadDefaultContent if default content should be loaded
+     * @throws Exception if there were some problems while initializing
+     */
+    private void initDirectoryService(final ServletContext servletContext, final File workDir,
+            final boolean loadDefaultContent) throws Exception {
+
+        // Initialize the LDAP service
+        service = new DefaultDirectoryService();
+        service.setInstanceLayout(new InstanceLayout(workDir));
+
+        CacheService cacheService = new CacheService();
+        cacheService.initialize(service.getInstanceLayout());
+
+        service.setCacheService(cacheService);
+
+        // first load the schema
+        initSchemaPartition();
+
+        // then the system partition
+        // this is a MANDATORY partition
+        // DO NOT add this via addPartition() method, trunk code complains about duplicate partition
+        // while initializing 
+        JdbmPartition systemPartition = new JdbmPartition(service.getSchemaManager(), service.getDnFactory());
+        systemPartition.setId("system");
+        systemPartition.setPartitionPath(
+                new File(service.getInstanceLayout().getPartitionsDirectory(), systemPartition.getId()).toURI());
+        systemPartition.setSuffixDn(new Dn(ServerDNConstants.SYSTEM_DN));
+        systemPartition.setSchemaManager(service.getSchemaManager());
+
+        // mandatory to call this method to set the system partition
+        // Note: this system partition might be removed from trunk
+        service.setSystemPartition(systemPartition);
+
+        // Disable the ChangeLog system
+        service.getChangeLog().setEnabled(false);
+        service.setDenormalizeOpAttrsEnabled(true);
+
+        // Now we can create as many partitions as we need
+        Partition ispPartition = addPartition("isp", "o=isp", service.getDnFactory());
+
+        // Index some attributes on the apache partition
+        addIndex(ispPartition, "objectClass", "ou", "uid");
+
+        // And start the service
+        service.startup();
+
+        if (loadDefaultContent) {
+            Resource contentLdif = WebApplicationContextUtils.getWebApplicationContext(servletContext).
+                    getResource("classpath:/content.ldif");
+            LdifInputStreamLoader contentLoader = new LdifInputStreamLoader(service.getAdminSession(),
+                    contentLdif.getInputStream());
+            int numEntries = contentLoader.execute();
+            LOG.info("Successfully created {} entries", numEntries);
+        }
+    }
+
+    /**
+     * Startup ApacheDS embedded.
+     *
+     * @param sce ServletContext event
+     */
+    @Override
+    public void contextInitialized(final ServletContextEvent sce) {
+        File workDir = (File) sce.getServletContext().getAttribute("javax.servlet.context.tempdir");
+        workDir = new File(workDir, "server-work");
+
+        final boolean loadDefaultContent = !workDir.exists();
+
+        if (loadDefaultContent && !workDir.mkdirs()) {
+            throw new RuntimeException("Could not create " + workDir.getAbsolutePath());
+        }
+
+        Entry result;
+        try {
+            initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent);
+
+            server = new LdapServer();
+            server.setTransports(new TcpTransport(Integer.valueOf(
+                    WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext()).
+                    getBean("testds.port", String.class))));
+            server.setDirectoryService(service);
+
+            server.start();
+
+            // store directoryService in context to provide it to servlets etc.
+            sce.getServletContext().setAttribute(DirectoryService.JNDI_KEY, service);
+
+            result = service.getAdminSession().lookup(new Dn("o=isp"));
+        } catch (Exception e) {
+            LOG.error("Fatal error in context init", e);
+            throw new RuntimeException(e);
+        }
+
+        if (result == null) {
+            throw new RuntimeException("Base DN not found");
+        } else {
+            LOG.info("ApacheDS startup completed succesfully");
+        }
+    }
+
+    /**
+     * Shutdown ApacheDS embedded.
+     *
+     * @param sce ServletContext event
+     */
+    @Override
+    public void contextDestroyed(final ServletContextEvent sce) {
+        try {
+            if (server != null) {
+                server.stop();
+            }
+            if (service != null) {
+                service.shutdown();
+            }
+        } catch (Exception e) {
+            LOG.error("Fatal error in context shutdown", e);
+            throw new RuntimeException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ConnIdStartStopListener.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ConnIdStartStopListener.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ConnIdStartStopListener.java
new file mode 100644
index 0000000..dece02f
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ConnIdStartStopListener.java
@@ -0,0 +1,105 @@
+/*
+ * 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.syncope.fit.buildtools;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import org.identityconnectors.common.security.SecurityUtil;
+import org.identityconnectors.framework.impl.api.local.ThreadClassLoaderManager;
+import org.identityconnectors.framework.server.ConnectorServer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+public class ConnIdStartStopListener implements ServletContextListener {
+
+    /**
+     * Logger.
+     */
+    private static final Logger LOG = LoggerFactory.getLogger(ConnIdStartStopListener.class);
+
+    private static final String SERVER = "ConnIdConnectorServer";
+
+    /**
+     * Build list of URLs from bundles available under /WEB-INF/lib
+     *
+     * @param ctx ServletContext needed for getting ConnId jar bundles URLs
+     */
+    private List<URL> getBundleURLs(final ServletContext ctx) {
+        final List<URL> bundleURLs = new ArrayList<>();
+
+        for (String bundleFile : new String[] {
+            "testconnectorserver.soap.bundle",
+            "testconnectorserver.db.bundle",
+            "testconnectorserver.csvdir.bundle",
+            "testconnectorserver.ldap.bundle" }) {
+
+            URL url = null;
+            try {
+                url = ctx.getResource("/WEB-INF/lib/"
+                        + WebApplicationContextUtils.getWebApplicationContext(ctx).getBean(bundleFile, String.class));
+            } catch (MalformedURLException e) {
+                // ignore
+            }
+            if (url != null) {
+                bundleURLs.add(url);
+            }
+        }
+
+        LOG.info("ConnId bundles loaded: " + bundleURLs);
+
+        return bundleURLs;
+    }
+
+    @Override
+    public void contextInitialized(final ServletContextEvent sce) {
+        ConnectorServer _server = ConnectorServer.newInstance();
+        WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext());
+        try {
+            _server.setPort(Integer.parseInt(ctx.getBean("testconnectorserver.port", String.class)));
+
+            _server.setBundleURLs(getBundleURLs(sce.getServletContext()));
+
+            _server.setKeyHash(SecurityUtil.computeBase64SHA1Hash(
+                    ctx.getBean("testconnectorserver.key", String.class).toCharArray()));
+
+            _server.start();
+            LOG.info("ConnId connector server listening on port " + _server.getPort());
+        } catch (Exception e) {
+            LOG.error("Could not start ConnId connector server", e);
+        }
+
+        sce.getServletContext().setAttribute(SERVER, _server);
+    }
+
+    @Override
+    public void contextDestroyed(final ServletContextEvent sce) {
+        final ConnectorServer _server = (ConnectorServer) sce.getServletContext().getAttribute(SERVER);
+        if (_server != null && _server.isStarted()) {
+            _server.stop();
+        }
+        ThreadClassLoaderManager.clearInstance();
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/H2StartStopListener.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/H2StartStopListener.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/H2StartStopListener.java
new file mode 100644
index 0000000..feee732
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/H2StartStopListener.java
@@ -0,0 +1,82 @@
+/*
+ * 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.syncope.fit.buildtools;
+
+import java.sql.SQLException;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.sql.DataSource;
+import org.h2.tools.Server;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.datasource.init.DataSourceInitializer;
+import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Utility servlet context listener managing H2 test server instance (to be used as external resource).
+ */
+public class H2StartStopListener implements ServletContextListener {
+
+    /**
+     * Logger.
+     */
+    private static final Logger LOG = LoggerFactory.getLogger(H2StartStopListener.class);
+
+    private static final String H2_TESTDB = "h2TestDb";
+
+    @Override
+    public void contextInitialized(final ServletContextEvent sce) {
+        ServletContext context = sce.getServletContext();
+        WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
+
+        try {
+            Server h2TestDb = new Server();
+            h2TestDb.runTool("-tcp", "-tcpDaemon", "-web", "-webDaemon",
+                    "-webPort", ctx.getBean("testdb.webport", String.class));
+
+            context.setAttribute(H2_TESTDB, h2TestDb);
+        } catch (SQLException e) {
+            LOG.error("Could not start H2 test db", e);
+        }
+
+        DataSource datasource = ctx.getBean(DataSource.class);
+
+        ResourceDatabasePopulator populator = new ResourceDatabasePopulator(ctx.getResource("classpath:/testdb.sql"));
+        populator.setSqlScriptEncoding("UTF-8");
+        DataSourceInitializer init = new DataSourceInitializer();
+        init.setDataSource(datasource);
+        init.setEnabled(true);
+        init.setDatabasePopulator(populator);
+        init.afterPropertiesSet();
+        LOG.info("Database successfully initialized");
+    }
+
+    @Override
+    public void contextDestroyed(final ServletContextEvent sce) {
+        final ServletContext context = sce.getServletContext();
+
+        final Server h2TestDb = (Server) context.getAttribute(H2_TESTDB);
+        if (h2TestDb != null) {
+            h2TestDb.shutdown();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/LdifInputStreamLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/LdifInputStreamLoader.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/LdifInputStreamLoader.java
new file mode 100644
index 0000000..fd9e9e4
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/LdifInputStreamLoader.java
@@ -0,0 +1,131 @@
+/*
+ * 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.syncope.fit.buildtools;
+
+import java.io.InputStream;
+import java.util.List;
+import org.apache.commons.io.IOUtils;
+import org.apache.directory.api.ldap.model.entry.DefaultEntry;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.entry.Modification;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.ldif.LdifEntry;
+import org.apache.directory.api.ldap.model.ldif.LdifReader;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.server.protocol.shared.store.LdifLoadFilter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LdifInputStreamLoader {
+
+    /**
+     * The log for this class.
+     */
+    private static final Logger LOG = LoggerFactory.getLogger(LdifInputStreamLoader.class);
+
+    /**
+     * A handle on the top core session.
+     */
+    protected CoreSession coreSession;
+
+    /**
+     * The LDIF input stream file containing LDIFs to load.
+     */
+    protected InputStream ldif;
+
+    /**
+     * the total count of entries loaded
+     */
+    private int count;
+
+    /**
+     * Creates a new instance of LdifFileLoader.
+     *
+     * @param coreSession the context to load the entries into.
+     * @param ldif the file of LDIF entries to load.
+     */
+    public LdifInputStreamLoader(final CoreSession coreSession, final InputStream ldif) {
+        this(coreSession, ldif, null);
+    }
+
+    /**
+     * Creates a new instance of LdifFileLoader.
+     *
+     * @param coreSession
+     * @param ldif
+     * @param filters
+     */
+    public LdifInputStreamLoader(
+            final CoreSession coreSession, final InputStream ldif, final List<? extends LdifLoadFilter> filters) {
+
+        this.coreSession = coreSession;
+        this.ldif = ldif;
+    }
+
+    /**
+     * Opens the LDIF file and loads the entries into the context.
+     *
+     * @return The count of entries created.
+     */
+    public int execute() {
+        try {
+            try {
+                for (LdifEntry ldifEntry : new LdifReader(ldif)) {
+                    Dn dn = ldifEntry.getDn();
+
+                    if (ldifEntry.isEntry()) {
+                        Entry entry = ldifEntry.getEntry();
+
+                        try {
+                            coreSession.lookup(dn);
+                            LOG.debug("Found {}, will not create.", dn);
+                        } catch (Exception e) {
+                            try {
+                                coreSession.add(
+                                        new DefaultEntry(coreSession.getDirectoryService().getSchemaManager(), entry));
+                                count++;
+                                LOG.debug("Created {}.", dn);
+                            } catch (LdapException e1) {
+                                LOG.error("Could not create entry " + entry, e1);
+                            }
+                        }
+                    } else {
+                        //modify
+                        List<Modification> items = ldifEntry.getModifications();
+
+                        try {
+                            coreSession.modify(dn, items);
+                            LOG.debug("Modified: " + dn + " with modificationItems: " + items);
+                        } catch (LdapException e) {
+                            LOG.debug("Could not modify: " + dn + " with modificationItems: " + items, e);
+                        }
+                    }
+                }
+            } finally {
+                IOUtils.closeQuietly(ldif);
+            }
+        } catch (Exception ioe) {
+            LOG.error(I18n.err(I18n.ERR_174), ioe);
+        }
+
+        return count;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ServiceTimeoutServlet.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ServiceTimeoutServlet.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ServiceTimeoutServlet.java
new file mode 100644
index 0000000..dcfe72e
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ServiceTimeoutServlet.java
@@ -0,0 +1,105 @@
+/*
+ * 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.syncope.fit.buildtools;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Just used to verify a connector request timeout.
+ */
+public class ServiceTimeoutServlet extends HttpServlet {
+
+    private static final long serialVersionUID = -1467488672392710293L;
+
+    /**
+     * Processes requests for both HTTP
+     * <code>GET</code> and
+     * <code>POST</code> methods.
+     *
+     * @param request servlet request
+     * @param response servlet response
+     * @throws ServletException if a servlet-specific error occurs
+     * @throws IOException if an I/O error occurs
+     */
+    protected void processRequest(final HttpServletRequest request, final HttpServletResponse response)
+            throws ServletException, IOException {
+
+        response.setContentType("text/html;charset=UTF-8");
+
+        try {
+            Thread.sleep(60000);
+        } catch (InterruptedException ignore) {
+            // ignore
+        }
+
+        final PrintWriter out = response.getWriter();
+        try {
+            out.println("OK");
+        } finally {
+            out.close();
+        }
+    }
+
+    /**
+     * Handles the HTTP
+     * <code>GET</code> method.
+     *
+     * @param request servlet request
+     * @param response servlet response
+     * @throws ServletException if a servlet-specific error occurs
+     * @throws IOException if an I/O error occurs
+     */
+    @Override
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
+            throws ServletException, IOException {
+
+        processRequest(request, response);
+    }
+
+    /**
+     * Handles the HTTP
+     * <code>POST</code> method.
+     *
+     * @param request servlet request
+     * @param response servlet response
+     * @throws ServletException if a servlet-specific error occurs
+     * @throws IOException if an I/O error occurs
+     */
+    @Override
+    protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
+            throws ServletException, IOException {
+
+        processRequest(request, response);
+    }
+
+    /**
+     * Returns a short description of the servlet.
+     *
+     * @return a String containing servlet description
+     */
+    @Override
+    public String getServletInfo() {
+        return "Service Timeout";
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/resources/buildToolsContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/resources/buildToolsContext.xml b/syncope620/fit/build-tools/src/main/resources/buildToolsContext.xml
new file mode 100644
index 0000000..2b63ed6
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/resources/buildToolsContext.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+  <bean id="testDataSource"
+        class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+    <property name="driverClassName" value="${testdb.driver}"/>
+    <property name="url" value="${testdb.url}"/>
+    <property name="username" value="${testdb.username}"/>
+    <property name="password" value="${testdb.password}"/>
+  </bean>
+
+  <bean id="testds.port" class="java.lang.String">
+    <constructor-arg value="${testds.port}"/>
+  </bean>
+  <bean id="testdb.webport" class="java.lang.String">
+    <constructor-arg value="${testdb.webport}"/>
+  </bean>  
+  <bean id="testconnectorserver.port" class="java.lang.String">
+    <constructor-arg value="${testconnectorserver.port}"/>
+  </bean>  
+  <bean id="testconnectorserver.key" class="java.lang.String">
+    <constructor-arg value="${testconnectorserver.key}"/>
+  </bean>  
+  <bean id="testconnectorserver.soap.bundle" class="java.lang.String">
+    <constructor-arg value="net.tirasa.connid.bundles.soap-${connid.soap.version}.jar"/>
+  </bean>  
+  <bean id="testconnectorserver.db.bundle" class="java.lang.String">
+    <constructor-arg value="net.tirasa.connid.bundles.db.table-${connid.db.table.version}.jar"/>
+  </bean>  
+  <bean id="testconnectorserver.csvdir.bundle" class="java.lang.String">
+    <constructor-arg value="net.tirasa.connid.bundles.csvdir-${connid.csvdir.version}.jar"/>
+  </bean>  
+  <bean id="testconnectorserver.ldap.bundle" class="java.lang.String">
+    <constructor-arg value="net.tirasa.connid.bundles.ldap-${connid.ldap.version}.jar"/>
+  </bean>
+    
+</beans>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/resources/content.ldif
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/resources/content.ldif b/syncope620/fit/build-tools/src/main/resources/content.ldif
new file mode 100644
index 0000000..aa47af5
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/resources/content.ldif
@@ -0,0 +1,57 @@
+# Licensed 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.
+DN: o=isp
+objectClass: organization
+objectClass: top
+o: isp
+
+DN: ou=People,o=isp
+objectClass: organizationalUnit
+objectClass: top
+ou: People
+
+DN: ou=Groups,o=isp
+objectClass: organizationalUnit
+objectClass: top
+ou: Groups
+
+DN: cn=testLDAPGroup,ou=Groups,o=isp
+objectClass: groupOfUniqueNames
+objectClass: top
+cn: testLDAPGroup
+uniqueMember: uid=admin,ou=system
+uniqueMember: uid=syncFromLDAP,ou=People,o=isp
+owner: uid=syncFromLDAP,ou=People,o=isp
+
+DN: uid=syncFromLDAP,ou=People,o=isp
+objectClass: organizationalPerson
+objectClass: person
+objectClass: inetOrgPerson
+objectClass: top
+cn: syncFromLDAP
+description: Active
+mail: syncFromLDAP@syncope.apache.org
+sn: Surname
+uid: syncFromLDAP
+userpassword:: cGFzc3dvcmQxMjM=
+givenname: syncFromLDAP
+registeredAddress:  5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8
+jpegPhoto:: /9j/4AAQSkZJRgABAQEBKwErAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoH
+ BwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQk
+ UDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wg
+ ARCAAEAAQDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACP/EABQBAQAAAAAAAAAAAAAAA
+ AAAAAD/2gAMAwEAAhADEAAAAUuf/8QAFhABAQEAAAAAAAAAAAAAAAAAAwAS/9oACAEBAAEFAiLV
+ /8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/
+ aAAgBAgEBPwF//8QAGhAAAQUBAAAAAAAAAAAAAAAAAgABESEiQf/aAAgBAQAGPwI9k2orq//EAB
+ kQAAMAAwAAAAAAAAAAAAAAAAERIQBBYf/aAAgBAQABPyF20CYlpT3P/9oADAMBAAIAAwAAABCf/
+ 8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/a
+ AAgBAgEBPxB//8QAGhABAAIDAQAAAAAAAAAAAAAAAREhAEFRYf/aAAgBAQABPxCUKGDcAUFrvhoz/9k=

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/resources/log4j2.xml b/syncope620/fit/build-tools/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..ffe88f6
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/resources/log4j2.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<configuration status="WARN">
+
+  <appenders>
+    
+    <Console name="main" target="SYSTEM_OUT">
+      <PatternLayout>
+        <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+      </PatternLayout>
+    </Console>
+
+  </appenders>
+  
+  <loggers>
+        
+    <root level="INFO">
+      <appender-ref ref="main"/>
+    </root>
+    
+  </loggers>
+</configuration>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/resources/testdb.sql
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/resources/testdb.sql b/syncope620/fit/build-tools/src/main/resources/testdb.sql
new file mode 100644
index 0000000..ff4dd47
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/resources/testdb.sql
@@ -0,0 +1,46 @@
+-- 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.
+ALTER USER sa SET PASSWORD '${testdb.password}';
+
+DROP TABLE test IF EXISTS;
+CREATE TABLE test (
+id VARCHAR(50) PRIMARY KEY,
+password VARCHAR(255) NOT NULL,
+status VARCHAR(5));
+
+INSERT INTO test VALUES ('testuser1', 'password', 'false');
+
+-- this table must be created in order to provide a specific test for issueSYNCOPE68
+DROP TABLE test2 IF EXISTS;
+CREATE TABLE test2 (
+id VARCHAR(50) PRIMARY KEY,
+password VARCHAR(255) NOT NULL,
+status VARCHAR(5));
+
+INSERT INTO test2 VALUES ('testuser2', 'password321', 'false');
+INSERT INTO test2 VALUES ('rossini', 'password321', 'true');
+INSERT INTO test2 VALUES ('verdi', 'password321', 'true');
+
+-- this table is for issueSYNCOPE230
+DROP TABLE testsync IF EXISTS;
+CREATE TABLE TESTSYNC (
+id NUMBER(10) PRIMARY KEY,
+username VARCHAR(80),
+surname VARCHAR(80),
+email VARCHAR(80));
+
+INSERT INTO testsync VALUES (965, 'issuesyncope230', 'Surname', 'syncope230@syncope.apache.org');

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/webapp/WEB-INF/web.xml b/syncope620/fit/build-tools/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..df3438d
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
+                             http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+         version="3.1">
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>classpath*:/buildToolsContext.xml</param-value>
+  </context-param>
+  
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+  <listener>
+    <listener-class>org.apache.syncope.fit.buildtools.ApacheDSStartStopListener</listener-class>
+  </listener>
+  <listener>
+    <listener-class>org.apache.syncope.fit.buildtools.H2StartStopListener</listener-class>
+  </listener>
+  <listener>
+    <listener-class>org.apache.syncope.fit.buildtools.ConnIdStartStopListener</listener-class>
+  </listener>
+  <servlet>
+    <servlet-name>ApacheDSRootDseServlet</servlet-name>
+    <servlet-class>org.apache.syncope.fit.buildtools.ApacheDSRootDseServlet</servlet-class>
+  </servlet>
+  <servlet>
+    <servlet-name>ServiceTimeoutServlet</servlet-name>
+    <servlet-class>org.apache.syncope.fit.buildtools.ServiceTimeoutServlet</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>ApacheDSRootDseServlet</servlet-name>
+    <url-pattern>/apacheDS</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>ServiceTimeoutServlet</servlet-name>
+    <url-pattern>/services/*</url-pattern>
+  </servlet-mapping>
+
+</web-app>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/pom.xml b/syncope620/fit/pom.xml
new file mode 100644
index 0000000..54c847f
--- /dev/null
+++ b/syncope620/fit/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.syncope</groupId>
+    <artifactId>syncope</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <name>Apache Syncope FIT</name>
+  <description>Apache Syncope Full Integration Test</description>
+  <groupId>org.apache.syncope</groupId>
+  <artifactId>syncope-fit</artifactId>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>build-tools</module>
+    <module>reference</module>
+  </modules>
+
+</project>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/pom.xml b/syncope620/fit/reference/pom.xml
new file mode 100644
index 0000000..148c71a
--- /dev/null
+++ b/syncope620/fit/reference/pom.xml
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.syncope</groupId>
+    <artifactId>syncope-fit</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <name>Apache Syncope FIT Server Reference</name>
+  <description>Apache Syncope FIT Server Reference</description>
+  <groupId>org.apache.syncope.fit</groupId>
+  <artifactId>syncope-fit-server-reference</artifactId>
+  <packaging>war</packaging>
+  
+  <properties>
+    <jdbcdriver.groupId>com.h2database</jdbcdriver.groupId>
+    <jdbcdriver.artifactId>h2</jdbcdriver.artifactId>
+    
+    <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+  </properties>
+
+  <dependencies>
+    <dependency> 
+      <groupId>javax.servlet</groupId> 
+      <artifactId>javax.servlet-api</artifactId> 
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>javax.servlet.jsp-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>jstl</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.syncope.server</groupId>
+      <artifactId>syncope-server-rest-cxf</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope.server</groupId>
+      <artifactId>syncope-server-workflow-java</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope.server</groupId>
+      <artifactId>syncope-server-persistence-jpa</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.syncope.fit</groupId>
+      <artifactId>syncope-fit-build-tools</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>net.tirasa.connid.bundles.soap</groupId>
+      <artifactId>wssample</artifactId>
+      <version>${connid.soap.version}</version>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.h2database</groupId>
+      <artifactId>h2</artifactId>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.lmax</groupId>
+      <artifactId>disruptor</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>jquery</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>jquery-ui</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>highlightjs</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+        </configuration>
+      </plugin>
+                
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <id>set-bundles</id>
+            <phase>process-test-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+      <plugin>
+        <groupId>org.codehaus.cargo</groupId>
+        <artifactId>cargo-maven2-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <container>
+            <dependencies>
+              <dependency>
+                <groupId>com.h2database</groupId>
+                <artifactId>h2</artifactId>
+              </dependency>
+              <dependency>
+                <groupId>${jdbcdriver.groupId}</groupId>
+                <artifactId>${jdbcdriver.artifactId}</artifactId>
+              </dependency>
+            </dependencies>
+          </container>
+          <configuration>
+            <type>standalone</type>
+            <properties>
+              <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
+              <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port>
+              <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port>
+
+              <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
+            </properties>
+            <configfiles>
+              <configfile>
+                <file>${project.build.directory}/classes/context.xml</file>
+                <todir>conf/</todir>
+                <tofile>context.xml</tofile>
+              </configfile>
+            </configfiles>
+          </configuration>
+          <deployables>
+            <deployable>
+              <groupId>net.tirasa.connid.bundles.soap</groupId>
+              <artifactId>wssample</artifactId>
+              <type>war</type>
+              <properties>
+                <context>wssample</context>
+              </properties>
+            </deployable>
+            <deployable>
+              <groupId>org.apache.syncope.fit</groupId>
+              <artifactId>syncope-fit-build-tools</artifactId>
+              <type>war</type>
+              <properties>
+                <context>syncope-fit-build-tools</context>
+              </properties>
+            </deployable>
+            <deployable>
+              <location>${project.build.directory}/${project.build.finalName}</location>
+              <pingURL>http://localhost:${cargo.servlet.port}/syncope/cacheStats.jsp</pingURL>
+              <pingTimeout>60000</pingTimeout>
+              <properties>
+                <context>syncope</context>
+              </properties>
+            </deployable>
+          </deployables>
+        </configuration>
+        <executions>
+          <execution>
+            <id>start-container</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>start</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>stop-container</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>stop</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+      </plugin>
+    </plugins>
+    
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+      <resource>
+        <directory>${basedir}/../../server/persistence-jpa/src/test/resources</directory>
+        <includes>
+          <include>content.xml</include>
+          <include>persistence.properties</include>
+        </includes>
+        <filtering>true</filtering>
+      </resource>
+      <resource>
+        <directory>${basedir}/../../server/misc/src/main/resources</directory>
+        <includes>
+          <include>security.properties</include>
+        </includes>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+  </build>
+  
+  <profiles>
+    <profile>
+      <id>debug</id>
+
+      <build>
+        <defaultGoal>clean verify cargo:run</defaultGoal>
+
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.cargo</groupId>
+            <artifactId>cargo-maven2-plugin</artifactId>
+            <inherited>true</inherited>
+            <configuration>
+              <configuration>
+                <properties>
+                  <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
+                    -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
+                </properties>
+              </configuration>
+            </configuration>
+            <executions>
+              <execution>
+                <id>start-container</id>
+                <phase>none</phase>
+              </execution>
+              <execution>
+                <id>stop-container</id>
+                <phase>none</phase>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/resources/connid.properties
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/resources/connid.properties b/syncope620/fit/reference/src/main/resources/connid.properties
new file mode 100644
index 0000000..54d83c3
--- /dev/null
+++ b/syncope620/fit/reference/src/main/resources/connid.properties
@@ -0,0 +1,18 @@
+# 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.
+connid.locations=${connid.location},\
+connid://${testconnectorserver.key}@localhost:${testconnectorserver.port}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/resources/context.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/resources/context.xml b/syncope620/fit/reference/src/main/resources/context.xml
new file mode 100644
index 0000000..471d561
--- /dev/null
+++ b/syncope620/fit/reference/src/main/resources/context.xml
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+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.
+-->
+<Context>
+  <!-- Disable session persistence across Tomcat restarts -->
+  <Manager pathname=""/>
+</Context>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/resources/log4j2.xml b/syncope620/fit/reference/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..d8acf8c
--- /dev/null
+++ b/syncope620/fit/reference/src/main/resources/log4j2.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<configuration status="WARN">
+
+  <appenders>
+    
+    <RollingRandomAccessFile name="main" fileName="${log.directory}/server.log"
+                             filePattern="${log.directory}/server-%d{yyyy-MM-dd}.log.gz"
+                             immediateFlush="false" append="true">
+      <PatternLayout>
+        <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy/>
+        <SizeBasedTriggeringPolicy size="250 MB"/>
+      </Policies>
+    </RollingRandomAccessFile>
+
+    <RollingRandomAccessFile name="persistence" fileName="${log.directory}/server-persistence.log"
+                             filePattern="${log.directory}/server-persistence-%d{yyyy-MM-dd}.log.gz"
+                             immediateFlush="false" append="true">
+      <PatternLayout>
+        <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy/>
+        <SizeBasedTriggeringPolicy size="250 MB"/>
+      </Policies>
+    </RollingRandomAccessFile>
+
+    <RollingRandomAccessFile name="rest" fileName="${log.directory}/server-rest.log"
+                             filePattern="${log.directory}/server-rest-%d{yyyy-MM-dd}.log.gz"
+                             immediateFlush="false" append="true">
+      <PatternLayout>
+        <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy/>
+        <SizeBasedTriggeringPolicy size="250 MB"/>
+      </Policies>
+    </RollingRandomAccessFile>
+
+    <RollingRandomAccessFile name="connid" fileName="${log.directory}/server-connid.log"
+                             filePattern="${log.directory}/server-connid-%d{yyyy-MM-dd}.log.gz"
+                             immediateFlush="false" append="true">
+      <PatternLayout>
+        <pattern>%d{HH:mm:ss.SSS} %-5level %msg%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy/>
+        <SizeBasedTriggeringPolicy size="250 MB"/>
+      </Policies>
+    </RollingRandomAccessFile>
+
+    <!-- Audit -->    
+    <Jdbc name="audit" tableName="SYNCOPEAUDIT">
+      <ConnectionFactory class="org.apache.syncope.server.logic.audit.AuditConnectionFactory" method="getConnection"/>
+      <Column name="EVENT_DATE" isEventTimestamp="true"/>
+      <Column name="LOGGER_LEVEL" pattern="%level" isUnicode="false"/>
+      <Column name="LOGGER" pattern="%logger" isUnicode="false"/>
+      <Column name="MESSAGE" pattern="%message" isUnicode="false"/>
+      <Column name="THROWABLE" pattern="%ex{full}" isUnicode="false"/>
+    </Jdbc>
+
+  </appenders>
+  
+  <loggers>
+    
+    <asyncLogger name="org.apache.syncope.server.persistence" additivity="false" level="INFO">
+      <appender-ref ref="persistence"/>
+    </asyncLogger>
+    <asyncLogger name="org.springframework.orm" additivity="false" level="INFO">
+      <appender-ref ref="persistence"/>
+    </asyncLogger>
+    
+    <asyncLogger name="org.apache.syncope.server.rest" additivity="false" level="INFO">
+      <appender-ref ref="rest"/>
+    </asyncLogger>
+    <asyncLogger name="org.springframework.web" additivity="false" level="INFO">
+      <appender-ref ref="rest"/>
+    </asyncLogger>
+    <asyncLogger name="org.apache.http" additivity="false" level="INFO">
+      <appender-ref ref="rest"/>
+    </asyncLogger>
+    <asyncLogger name="org.apache.cxf" additivity="false" level="ERROR">
+      <appender-ref ref="rest"/>
+    </asyncLogger>
+    
+    <asyncLogger name="org.identityconnectors" additivity="false" level="DEBUG">
+      <appender-ref ref="connid"/>
+    </asyncLogger>
+    <asyncLogger name="net.tirasa.connid" additivity="false" level="DEBUG">
+      <appender-ref ref="connid"/>
+    </asyncLogger>
+    <asyncLogger name="org.apache.syncope.server.provisioning.api.ConnIdBundleManager" additivity="false" level="INFO">
+      <appender-ref ref="connid"/>
+    </asyncLogger>
+    
+    <asyncLogger name="org.springframework" additivity="false" level="INFO">
+      <appender-ref ref="main"/>
+    </asyncLogger>
+     
+    <logger name="syncope.audit" additivity="false" level="DEBUG">
+      <appender-ref ref="audit"/>
+    </logger>
+    
+    <root level="INFO">
+      <appender-ref ref="main"/>
+    </root>
+    
+  </loggers>
+</configuration>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/resources/serverContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/resources/serverContext.xml b/syncope620/fit/reference/src/main/resources/serverContext.xml
new file mode 100644
index 0000000..8ab1eb1
--- /dev/null
+++ b/syncope620/fit/reference/src/main/resources/serverContext.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" 
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+  <bean id="confDirectoryPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+    <property name="order" value="1"/>
+    <property name="ignoreResourceNotFound" value="true"/>
+    <property name="ignoreUnresolvablePlaceholders" value="true"/>
+    <property name="locations">
+      <list>
+        <value>file:${conf.directory}/persistence.properties</value>
+        <value>file:${conf.directory}/security.properties</value>
+        <value>file:${conf.directory}/connid.properties</value>
+        <value>file:${conf.directory}/mail.properties</value>
+        <value>file:${conf.directory}/logic.properties</value>
+        <value>file:${conf.directory}/workflow.properties</value>
+      </list>
+    </property>
+  </bean>
+  <bean id="classpathPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+    <property name="locations">
+      <list>
+        <value>classpath:persistence.properties</value>
+        <value>classpath:security.properties</value>
+        <value>classpath:connid.properties</value>
+        <value>classpath:mail.properties</value>
+        <value>classpath:logic.properties</value>
+        <value>classpath:workflow.properties</value>
+      </list>
+    </property>
+  </bean>
+
+  <bean class="org.apache.syncope.server.misc.spring.ApplicationContextProvider"/>
+
+</beans>