Merge skins
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/README.md
diff --git a/checkstyle-configuration/pom.xml b/checkstyle-configuration/pom.xml
new file mode 100644
index 0000000..47d89c7
--- /dev/null
+++ b/checkstyle-configuration/pom.xml
@@ -0,0 +1,65 @@
+<?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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.project</groupId>
+    <artifactId>project</artifactId>
+    <version>34</version>
+    <relativePath />
+  </parent>
+  
+  <groupId>org.apache.directory.buildtools</groupId>
+  <artifactId>checkstyle-configuration</artifactId>
+  <name>Apache Directory Checkstyle Configuration</name>
+  <packaging>jar</packaging>
+  <version>0.4-SNAPSHOT</version>
+
+  <description>
+     Customized checkstyle configuration used by the maven-checkstyle-plugin.
+  </description>
+
+  <properties>
+    <skin.version>1.0.2</skin.version>
+    <distMgmtSiteUrl>scpexe://people.apache.org/www/directory.apache.org/checkstyle-configuration/gen-docs/${project.version}/</distMgmtSiteUrl>
+  </properties>
+
+  <distributionManagement>
+    <site>
+      <id>apache.directory</id>
+      <url>${distMgmtSiteUrl}</url>
+    </site>
+  </distributionManagement>
+
+  <issueManagement>
+    <system>JIRA</system>
+    <url>http://issues.apache.org/jira/browse/DIR</url>
+  </issueManagement>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/directory/buildtools/checkstyle-configuration/trunk</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/directory/buildtools/checkstyle-configuration/trunk</developerConnection>
+    <url>http://svn.apache.org/viewvc/directory/buildtools/checkstyle-configuration/trunk</url>
+  </scm>
+
+</project>
+
diff --git a/checkstyle-configuration/src/main/resources/directory-checks.xml b/checkstyle-configuration/src/main/resources/directory-checks.xml
new file mode 100644
index 0000000..7230e3b
--- /dev/null
+++ b/checkstyle-configuration/src/main/resources/directory-checks.xml
@@ -0,0 +1,231 @@
+<?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.
+-->
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<!--
+
+  Checkstyle is very configurable. Be sure to read the documentation at
+  http://checkstyle.sf.net (or in your downloaded distribution).
+
+  Most Checks are configurable, be sure to consult the documentation.
+
+  To completely disable a check, just comment it out or delete it from the file.
+
+  Finally, it is worth reading the documentation.
+
+-->
+
+<module name="Checker">
+    <!--
+        If you set the basedir property below, then all reported file
+        names will be relative to the specified directory. See
+        http://checkstyle.sourceforge.net/5.x/config.html#Checker
+
+        <property name="basedir" value="${basedir}"/>
+    -->
+
+    <!-- Checks that each Java package has a Javadoc file used for commenting. -->
+    <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage       -->
+    <!--
+    <module name="JavadocPackage">
+      <property name="allowLegacy" value="true"/>
+    </module>
+    -->
+
+    <!-- Checks whether files end with a new line.                        -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+    <!-- module name="NewlineAtEndOfFile"/ -->
+
+    <!-- Checks that property files contain the same keys.         -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+    <module name="Translation"/>
+
+    <module name="FileLength"/>
+
+    <!-- Following interprets the header file as regular expressions. -->
+    <!-- <module name="RegexpHeader"/>                                -->
+
+    <module name="FileTabCharacter">
+        <property name="eachLine" value="true"/>
+    </module>
+
+    <!--
+    <module name="RegexpSingleline">
+        <!- \s matches whitespace character, $ matches end of line. ->
+        <property name="format" value="\s+$"/>
+        <property name="message" value="Line has trailing spaces."/>
+    </module>
+    -->
+
+    <module name="TreeWalker">
+
+        <property name="cacheFile" value="${checkstyle.cache.file}"/>
+
+        <!-- Checks for Javadoc comments.                     -->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+<!--         <module name="JavadocMethod"> -->
+<!--           No Javadoc required for private methods -->
+<!--           <property name="scope" value="protected"/> -->
+<!--         </module> -->
+<!--         <module name="JavadocType"> -->
+<!--           <property name="scope" value="public"/> -->
+<!--         </module> -->
+<!--         <module name="JavadocVariable"> -->
+<!--           No Javadoc required for private fields -->
+<!--           <property name="scope" value="protected"/> -->
+<!--         </module> -->
+<!--         <module name="JavadocStyle"> -->
+<!--             <property name="checkFirstSentence" value="false"/> -->
+<!--         </module> -->
+
+
+        <!-- Checks for Naming Conventions.                  -->
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <module name="ConstantName"/>
+        <module name="LocalFinalVariableName"/>
+        <module name="LocalVariableName"/>
+        <module name="MemberName"/>
+        <module name="MethodName"/>
+        <module name="PackageName"/>
+        <module name="ParameterName"/>
+        <module name="StaticVariableName"/>
+        <module name="TypeName"/>
+
+
+        <!-- Checks for Headers                                -->
+        <!-- See http://checkstyle.sf.net/config_header.html   -->
+        <!-- <module name="Header">                            -->
+            <!-- The follow property value demonstrates the ability     -->
+            <!-- to have access to ANT properties. In this case it uses -->
+            <!-- the ${basedir} property to allow Checkstyle to be run  -->
+            <!-- from any directory within a project. See property      -->
+            <!-- expansion,                                             -->
+            <!-- http://checkstyle.sf.net/config.html#properties        -->
+            <!-- <property                                              -->
+            <!--     name="headerFile"                                  -->
+            <!--     value="${basedir}/java.header"/>                   -->
+        <!-- </module> -->
+
+
+        <!-- Checks for imports                              -->
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <module name="AvoidStarImport"/>
+        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
+
+
+        <!-- Checks for Size Violations.                    -->
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <!-- module name="LineLength"/ -->
+        <!--module name="MethodLength"/ -->
+        <module name="ParameterNumber"/>
+
+
+        <!-- Checks for whitespace                               -->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <module name="EmptyForIteratorPad">
+            <property name="option" value="space"/>
+        </module>
+        <module name="MethodParamPad"/>
+        <module name="NoWhitespaceAfter">
+            <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
+        </module>
+        <module name="NoWhitespaceBefore"/>
+        <module name="OperatorWrap"/>
+        <module name="ParenPad">
+             <property name="tokens" value="ANNOTATION_FIELD_DEF, CTOR_DEF, CTOR_CALL, EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL, METHOD_DEF, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL, QUESTION"/>
+             <property name="option" value="space"/>
+        </module>
+        <module name="TypecastParenPad">
+            <property name="option" value="space"/>
+        </module>
+        <module name="WhitespaceAfter">
+            <property name="tokens" value="COMMA, TYPECAST"/>
+        </module>
+        <module name="WhitespaceAround"/>
+        <module name="EmptyLineSeparator">
+            <property name="tokens" value="IMPORT, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, CTOR_DEF, METHOD_DEF, STATIC_INIT, INSTANCE_INIT"/>
+        </module>
+
+
+        <!-- Modifier Checks                                    -->
+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+        <module name="ModifierOrder"/>
+        <module name="RedundantModifier"/>
+
+
+        <!-- Checks for blocks. You know, those {}'s         -->
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <module name="AvoidNestedBlocks"/>
+        <module name="EmptyBlock"/>
+        <module name="LeftCurly">
+            <property name="option" value="nl"/>
+        </module>
+        <module name="NeedBraces"/>
+        <module name="RightCurly">
+            <property name="option" value="alone"/>
+        </module>
+
+
+        <!-- Checks for common coding problems               -->
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- module name="AvoidInlineConditionals"/ -->
+        <module name="EmptyStatement"/>
+        <module name="EqualsHashCode"/>
+        <!-- module name="HiddenField">
+            <property name="ignoreSetter" value="true"/>
+            <property name="ignoreConstructorParameter" value="true"/>
+            <property name="setterCanReturnItsClass" value="true"/>
+        </module -->
+        <module name="IllegalInstantiation"/>
+        <module name="InnerAssignment"/>
+        <!-- module name="MagicNumber"/ -->
+        <module name="MissingSwitchDefault"/>
+        <module name="SimplifyBooleanExpression"/>
+        <!-- module name="SimplifyBooleanReturn"/ -->
+
+        <!-- Checks for class design                         -->
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!-- module name="DesignForExtension"/ -->
+        <module name="FinalClass"/>
+        <module name="HideUtilityClassConstructor"/>
+        <module name="InterfaceIsType"/>
+        <module name="VisibilityModifier">
+            <property name="packageAllowed" value="true"/>
+            <property name="protectedAllowed" value="true"/>
+        </module>
+        
+
+
+        <!-- Miscellaneous other checks.                   -->
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <module name="ArrayTypeStyle"/>
+        <!-- module name="FinalParameters"/ -->
+        <!-- module name="TodoComment"/ -->
+        <module name="UpperEll"/>
+
+    </module>
+
+</module>
diff --git a/checkstyle-configuration/src/site/site.xml b/checkstyle-configuration/src/site/site.xml
new file mode 100644
index 0000000..53ec198
--- /dev/null
+++ b/checkstyle-configuration/src/site/site.xml
@@ -0,0 +1,48 @@
+<?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.
+-->
+<!--
+  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+-->
+<project name="${project.name}">
+  <bannerLeft>
+    <src>images/server-icon_128x128.png</src>
+    <href>http://directory.apache.org/</href>
+    <name>${project.name}</name>
+  </bannerLeft>
+  <skin>
+    <groupId>org.apache.directory.skins</groupId>
+    <artifactId>directory-skin</artifactId>
+    <version>${skin.version}</version>
+  </skin>
+  <publishDate position="navigation-bottom" format="dd-MM-yyyy HH:mm"/>
+  <version position="right"/>
+  <body>
+    <links>
+       <!--
+         Need to encode a part of the url due to Issue
+         http://jira.codehaus.org/browse/MSITE-159
+         and as of https://bugzilla.mozilla.org/show_bug.cgi?id=43659
+         this workaround doesn't works in FF 3.x ...
+        -->
+       <item name="Apache Directory" href="http://directory.apache%2eorg/"/>
+       <item name="Apache" href="http://www.apache%2eorg/"/>
+       <item name="Maven" href="http://maven.apache%2eorg/"/>
+    </links>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/docker/openldap/Dockerfile b/docker/openldap/Dockerfile
new file mode 100644
index 0000000..513db10
--- /dev/null
+++ b/docker/openldap/Dockerfile
@@ -0,0 +1,47 @@
+#
+#   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.
+#
+
+FROM alpine
+
+RUN apk add --no-cache openldap openldap-back-hdb openldap-clients openssl
+
+ADD slapd-config.ldif slapd-data.ldif /tmp/
+
+# Generate a self-signed SSL certificate
+RUN openssl req -newkey rsa:4096 -sha512 -x509 -days 3650 -nodes \
+    -subj "/C=NA/ST=NA/L=NA/O=NA/CN=example.com" \
+    -out /etc/ssl/certs/ldap.pem -keyout /etc/ssl/private/ldap.pem && \
+    chown root:ldap /etc/ssl/private/ldap.pem && \
+    chmod 640 /etc/ssl/private/ldap.pem
+
+# Inject configuration
+RUN mkdir /etc/openldap/slapd.d && \
+    slapadd -d -1 -F /etc/openldap/slapd.d -n 0 -l /tmp/slapd-config.ldif
+
+# Inject data
+RUN slapadd -d 1 -F /etc/openldap/slapd.d -l /tmp/slapd-data.ldif
+
+# Fix permissions
+RUN chown -R ldap:ldap /var/lib/openldap && \
+    chown -R ldap:ldap /etc/openldap/slapd.d
+
+EXPOSE 389 636
+
+CMD /usr/sbin/slapd -d 256 -u ldap -g ldap -F /etc/openldap/slapd.d -h "ldap:/// ldaps:///"
+
diff --git a/docker/openldap/README.md b/docker/openldap/README.md
new file mode 100644
index 0000000..651dc7c
--- /dev/null
+++ b/docker/openldap/README.md
@@ -0,0 +1,37 @@
+> 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.
+
+
+# About
+
+A docker image to run OpenLDAP.
+
+
+## Build image
+
+    docker build -t apachedirectory/openldap .
+
+
+## Publish image
+
+    docker push apachedirectory/openldap
+
+
+## Usage
+
+    docker run -d -p 389:389 -p 636:636 apachedirectory/openldap
+
diff --git a/docker/openldap/slapd-config.ldif b/docker/openldap/slapd-config.ldif
new file mode 100644
index 0000000..4e511b5
--- /dev/null
+++ b/docker/openldap/slapd-config.ldif
@@ -0,0 +1,34 @@
+dn: cn=config
+objectClass: olcGlobal
+cn: config
+olcArgsFile: /var/lib/openldap/run/slapd.args
+olcPidFile: /var/lib/openldap/run/slapd.pid
+olcTLSCACertificateFile: /etc/ssl/certs/ldap.pem
+olcTLSCertificateFile: /etc/ssl/certs/ldap.pem
+olcTLSCertificateKeyFile: /etc/ssl/private/ldap.pem
+
+dn: cn=schema,cn=config
+objectClass: olcSchemaConfig
+cn: schema
+
+include: file:///etc/openldap/schema/core.ldif
+
+include: file:///etc/openldap/schema/cosine.ldif
+
+include: file:///etc/openldap/schema/inetorgperson.ldif
+
+dn: olcDatabase=frontend,cn=config
+objectClass: olcDatabaseConfig
+objectClass: olcFrontendConfig
+olcDatabase: frontend
+
+dn: olcDatabase=mdb,cn=config
+objectClass: olcDatabaseConfig
+objectClass: olcMdbConfig
+olcDatabase: mdb
+olcSuffix: dc=example,dc=com
+olcRootDN: cn=admin,dc=example,dc=com
+olcRootPW: secret
+olcDbDirectory: /var/lib/openldap/openldap-data
+olcDbIndex: objectClass eq
+
diff --git a/docker/openldap/slapd-data.ldif b/docker/openldap/slapd-data.ldif
new file mode 100644
index 0000000..7ca7d76
--- /dev/null
+++ b/docker/openldap/slapd-data.ldif
@@ -0,0 +1,5 @@
+dn: dc=example,dc=com
+objectclass: domain
+objectclass: top
+dc: example
+
diff --git a/docker/studio-build/Dockerfile b/docker/studio-build/Dockerfile
new file mode 100644
index 0000000..7e29954
--- /dev/null
+++ b/docker/studio-build/Dockerfile
@@ -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.
+#
+
+FROM maven
+
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends xvfb
+RUN apt-get install -y --no-install-recommends krb5-config krb5-user
+
+# Create home directory
+RUN mkdir /home/hnelson && chmod 777 /home/hnelson
+WORKDIR /home/hnelson
+
+# Add krb5.conf with EXAMPLE.COM domain
+ADD krb5.conf /etc/
+
+# Make /etc/passwd writeable to be able to inject username with dynamic uid/gid
+RUN chmod 666 /etc/passwd
+
+# Add and configure entrypoint script
+ADD entrypoint.sh /usr/local/bin
+RUN chmod 755 /usr/local/bin/entrypoint.sh
+ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
+
+# Add build script and make it the default command
+ADD build-studio-with-ui-tests.sh /usr/local/bin
+RUN chmod 755 /usr/local/bin/build-studio-with-ui-tests.sh
+CMD "/usr/local/bin/build-studio-with-ui-tests.sh"
+
diff --git a/docker/studio-build/README.md b/docker/studio-build/README.md
new file mode 100644
index 0000000..48af056
--- /dev/null
+++ b/docker/studio-build/README.md
@@ -0,0 +1,66 @@
+> 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.
+
+
+# About
+
+A docker image to run Apache Directory Studio build included full test suite within a docker container.
+
+It contains all requirements:
+* Java 8
+* Maven 3
+* Xvfb (for running UI tests)
+* LDAP client
+* Kerberos client
+
+
+## Build image
+
+    docker build -t apachedirectory/studio-build .
+
+
+## Publish image
+
+    docker push apachedirectory/studio-build
+
+
+## Usage
+
+Local
+
+    PATH_TO_STUDIO_SRC=...
+    docker run -it --rm \
+        -u $(id -u):$(id -g) \
+        -e HOME=/home/hnelson \
+        -v ~/.m2:/home/hnelson/.m2 \
+        -v $PATH_TO_STUDIO_SRC:/home/hnelson/studio \
+        apachedirectory/studio-build bash
+
+    cd /home/hnelson/studio
+    mvn -f pom-first.xml clean install
+    mvn clean install -Denable-ui-tests
+
+
+On Jenkins
+
+    docker run -i --rm \
+        -u $(id -u):$(id -g) \
+        -e HOME=/home/hnelson \
+        -v $(pwd):/home/hnelson/studio \
+        apachedirectory/studio-build
+
+
diff --git a/docker/studio-build/build-studio-with-ui-tests.sh b/docker/studio-build/build-studio-with-ui-tests.sh
new file mode 100755
index 0000000..bea75cf
--- /dev/null
+++ b/docker/studio-build/build-studio-with-ui-tests.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# stop execution if any command fails (i.e. exits with status code > 0)
+set -e
+
+# trace commands
+set -x
+
+cd /home/hnelson/studio
+mvn -V -f pom-first.xml clean install
+mvn -V clean install -Denable-ui-tests
+
diff --git a/docker/studio-build/entrypoint.sh b/docker/studio-build/entrypoint.sh
new file mode 100755
index 0000000..7cb2f71
--- /dev/null
+++ b/docker/studio-build/entrypoint.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -e
+
+export DISPLAY=:99
+Xvfb :99 -screen 0 1024x768x16 &
+
+echo "hnelson:x:$(id -u):$(id -g)::/home/hnelson:/bin/bash" >> /etc/passwd
+
+exec "$@"
+
diff --git a/docker/studio-build/krb5.conf b/docker/studio-build/krb5.conf
new file mode 100644
index 0000000..096316a
--- /dev/null
+++ b/docker/studio-build/krb5.conf
@@ -0,0 +1,8 @@
+[libdefaults]
+    default_realm = EXAMPLE.COM
+
+[realms]
+    EXAMPLE.COM = {
+        kdc = localhost:60088
+    }
+
diff --git a/docker/studio-build/mvn b/docker/studio-build/mvn
new file mode 100755
index 0000000..58f91f0
--- /dev/null
+++ b/docker/studio-build/mvn
@@ -0,0 +1,5 @@
+#!/bin/bash
+echo "$@"
+echo "$HOME"
+/usr/bin/mvn -Duser.home=$HOME "$@"
+
diff --git a/docker/xvfb/Dockerfile b/docker/xvfb/Dockerfile
new file mode 100644
index 0000000..92ceaa8
--- /dev/null
+++ b/docker/xvfb/Dockerfile
@@ -0,0 +1,27 @@
+#
+#   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.
+#
+
+FROM alpine
+
+RUN apk add --no-cache xvfb
+
+ENV DISPLAY :6
+
+CMD Xvfb $DISPLAY -ac -listen tcp -screen 0 1024x768x16
+
diff --git a/docker/xvfb/README.md b/docker/xvfb/README.md
new file mode 100644
index 0000000..8c9e476
--- /dev/null
+++ b/docker/xvfb/README.md
@@ -0,0 +1,49 @@
+> 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.
+
+
+# About
+
+A docker image to run Xvfb within a docker container and make an X11 server available to the host.
+
+Used to run Apache Directory Studio UI tests on Jenkins.
+
+
+## Build image
+
+    docker build -t apachedirectory/xvfb .
+
+
+## Publish image
+
+    docker push apachedirectory/xvfb
+
+
+## Usage
+
+    CONTAINER_NAME="dir-studio-ui-tests-xvfb"
+    for PORT in $(seq 6006 6099); do netstat -tln | grep $PORT || break; done
+    echo "Using TCP port $PORT for Xvfb"
+    export DISPLAY=:$((PORT-6000))
+    echo "Using DISPLAY $DISPLAY"
+    docker run -d --name $CONTAINER_NAME -e DISPLAY=$DISPLAY -p $PORT:$PORT apachedirectory/xvfb
+    xdpyinfo -display $DISPLAY
+    mvn clean install -Denable-ui-tests
+    docker stop $CONTAINER_NAME
+    docker rm $CONTAINER_NAME
+
+
diff --git a/junit-addons/LICENSE b/junit-addons/LICENSE
new file mode 100644
index 0000000..865b765
--- /dev/null
+++ b/junit-addons/LICENSE
@@ -0,0 +1,219 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.
+
+----------------------------------------------------------------
+
+    Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>
+
+    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.
+
diff --git a/junit-addons/NOTICE b/junit-addons/NOTICE
new file mode 100644
index 0000000..7296f17
--- /dev/null
+++ b/junit-addons/NOTICE
@@ -0,0 +1,9 @@
+Apache Directory JUnit Add-ons
+Copyright 2003-2014 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes/uses software, Mycila (http://code.google.com/p/mycila/),
+developed by Mathieu Carbou (http://code.google.com/p/mycila/)
+
diff --git a/junit-addons/pom.xml b/junit-addons/pom.xml
new file mode 100644
index 0000000..6477802
--- /dev/null
+++ b/junit-addons/pom.xml
@@ -0,0 +1,83 @@
+<?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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.project</groupId>
+    <artifactId>project</artifactId>
+    <version>32</version>
+  </parent>
+  
+  <groupId>org.apache.directory.junit</groupId>
+  <artifactId>junit-addons</artifactId>
+  <version>0.2-SNAPSHOT</version>
+  <name>Apache Directory JUnit Add-ons</name>
+  <packaging>bundle</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <skin.version>1.0.2</skin.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+    </dependency>
+  </dependencies>
+
+  <distributionManagement>
+    <site>
+      <id>apache.directory.buildtools.junit-addons</id>
+      <url>${distMgmtSiteUrl}</url>
+    </site>
+  </distributionManagement>
+
+  <issueManagement>
+    <system>JIRA</system>
+    <url>http://issues.apache.org/jira/browse/DIR</url>
+  </issueManagement>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/directory/buildtools/junit-addons/trunk</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/directory/buildtools/junit-addons/trunk</developerConnection>
+    <url>http://svn.apache.org/viewvc/directory/buildtools/trunk/junit-addons</url>
+  </scm>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <inherited>true</inherited>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+            <Export-Package>
+                {local-packages};version=${project.version};-noimport:=true
+            </Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/junit-addons/src/main/appended-resources/META-INF/LICENSE b/junit-addons/src/main/appended-resources/META-INF/LICENSE
new file mode 100644
index 0000000..3b6c43a
--- /dev/null
+++ b/junit-addons/src/main/appended-resources/META-INF/LICENSE
@@ -0,0 +1,17 @@
+
+----------------------------------------------------------------
+
+    Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>
+
+    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.
+
diff --git a/junit-addons/src/main/appended-resources/META-INF/NOTICE b/junit-addons/src/main/appended-resources/META-INF/NOTICE
new file mode 100644
index 0000000..1b43312
--- /dev/null
+++ b/junit-addons/src/main/appended-resources/META-INF/NOTICE
@@ -0,0 +1,4 @@
+
+This product includes/uses software, Mycila (http://code.google.com/p/mycila/),
+developed by Mathieu Carbou (http://code.google.com/p/mycila/)
+
diff --git a/junit-addons/src/main/java/com/mycila/junit/concurrent/Concurrency.java b/junit-addons/src/main/java/com/mycila/junit/concurrent/Concurrency.java
new file mode 100644
index 0000000..fac7e5c
--- /dev/null
+++ b/junit-addons/src/main/java/com/mycila/junit/concurrent/Concurrency.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>
+ *
+ * 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.
+ */
+
+package com.mycila.junit.concurrent;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Set the number of threads.
+ * <br>
+ * If 0 or less, the number of thread will be the number of test methdds ot test classes in the suite.
+ * <br>
+ * If the computation cannot be done, the default thread number will be the number of available cores.
+ *
+ * @author Mathieu Carbou (mathieu.carbou@gmail.com)
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.METHOD})
+public @interface Concurrency {
+    int value() default 0;
+}
diff --git a/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentException.java b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentException.java
new file mode 100644
index 0000000..9a2c4b0
--- /dev/null
+++ b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentException.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>
+ *
+ * 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.
+ */
+
+package com.mycila.junit.concurrent;
+
+/**
+ * @author Mathieu Carbou (mathieu.carbou@gmail.com)
+ */
+public final class ConcurrentException extends RuntimeException {
+    private ConcurrentException(Throwable cause) {
+        super(cause.getMessage(), cause);
+    }
+
+    public Throwable unwrap() {
+        Throwable t = getCause();
+        while (t instanceof ConcurrentException)
+            t = t.getCause();
+        return t;
+    }
+
+    public static ConcurrentException wrap(Throwable t) {
+        if (t instanceof ConcurrentException)
+            t = ((ConcurrentException) t).unwrap();
+        ConcurrentException concurrentException = new ConcurrentException(t);
+        concurrentException.setStackTrace(t.getStackTrace());
+        return concurrentException;
+    }
+
+}
diff --git a/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentJunitRunner.java b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentJunitRunner.java
new file mode 100644
index 0000000..e85f5b4
--- /dev/null
+++ b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentJunitRunner.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>
+ *
+ * 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.
+ */
+
+package com.mycila.junit.concurrent;
+
+import org.junit.Test;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.TestClass;
+
+/**
+ * @author Mathieu Carbou (mathieu.carbou@gmail.com)
+ */
+public final class ConcurrentJunitRunner extends BlockJUnit4ClassRunner {
+    public ConcurrentJunitRunner(final Class<?> klass) throws InitializationError {
+        super(klass);
+        int nThreads = 0;
+        if (klass.isAnnotationPresent(Concurrency.class))
+            nThreads = Math.max(0, klass.getAnnotation(Concurrency.class).value());
+        if (nThreads == 0)
+            nThreads = new TestClass(klass).getAnnotatedMethods(Test.class).size();
+        if (nThreads == 0)
+            nThreads = Runtime.getRuntime().availableProcessors();
+        setScheduler(new ConcurrentRunnerScheduler(
+                klass.getSimpleName(),
+                Math.min(Runtime.getRuntime().availableProcessors(), nThreads),
+                nThreads));
+    }
+}
\ No newline at end of file
diff --git a/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentRule.java b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentRule.java
new file mode 100644
index 0000000..f4e09ac
--- /dev/null
+++ b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentRule.java
@@ -0,0 +1,67 @@
+/**

+ * Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>

+ *

+ * 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.

+ */

+

+package com.mycila.junit.concurrent;

+

+import org.junit.rules.MethodRule;

+import org.junit.runners.model.FrameworkMethod;

+import org.junit.runners.model.Statement;

+

+import java.util.concurrent.CountDownLatch;

+

+/**

+ * @author Mathieu Carbou (mathieu.carbou@gmail.com)

+ */

+public final class ConcurrentRule implements MethodRule {

+    public Statement apply(final Statement statement, final FrameworkMethod frameworkMethod, final Object o) {

+        return new Statement() {

+            public void evaluate() throws Throwable {

+                Concurrency concurrency = frameworkMethod.getAnnotation(Concurrency.class);

+                if (concurrency == null)

+                    statement.evaluate();

+                else {

+                    int nThreads = Math.max(0, concurrency.value());

+                    if (nThreads == 0)

+                        nThreads = Runtime.getRuntime().availableProcessors();

+                    ConcurrentRunnerScheduler scheduler = new ConcurrentRunnerScheduler(

+                            o.getClass().getSimpleName() + "." + frameworkMethod.getName(),

+                            nThreads, nThreads);

+                    final CountDownLatch go = new CountDownLatch(1);

+                    Runnable runnable = new Runnable() {

+                        public void run() {

+                            try {

+                                go.await();

+                                statement.evaluate();

+                            } catch (InterruptedException e) {

+                                Thread.currentThread().interrupt();

+                            } catch (Throwable throwable) {

+                                throw ConcurrentException.wrap(throwable);

+                            }

+                        }

+                    };

+                    for (int i = 0; i < nThreads; i++)

+                        scheduler.schedule(runnable);

+                    go.countDown();

+                    try {

+                        scheduler.finished();

+                    } catch (ConcurrentException e) {

+                        throw e.unwrap();

+                    }

+                }

+            }

+        };

+    }

+}

diff --git a/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentRunnerScheduler.java b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentRunnerScheduler.java
new file mode 100644
index 0000000..6f430df
--- /dev/null
+++ b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentRunnerScheduler.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>
+ *
+ * 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.
+ */
+
+package com.mycila.junit.concurrent;
+
+import org.junit.runners.model.RunnerScheduler;
+
+import java.util.LinkedList;
+import java.util.Queue;
+import java.util.concurrent.CompletionService;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorCompletionService;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author Mathieu Carbou (mathieu.carbou@gmail.com)
+ */
+final class ConcurrentRunnerScheduler implements RunnerScheduler {
+
+    private final ExecutorService executorService;
+    private final Queue<Future<Void>> tasks = new LinkedList<Future<Void>>();
+    private final CompletionService<Void> completionService;
+
+    public ConcurrentRunnerScheduler(String name, int nThreadsMin, int nThreadsMax) {
+        executorService = new ThreadPoolExecutor(
+                nThreadsMin, nThreadsMax,
+                10L, TimeUnit.SECONDS,
+                new SynchronousQueue<Runnable>(),
+                new NamedThreadFactory(name),
+                new ThreadPoolExecutor.CallerRunsPolicy());
+        completionService = new ExecutorCompletionService<Void>(executorService);
+    }
+
+    public void schedule(Runnable childStatement) {
+        tasks.offer(completionService.submit(childStatement, null));
+    }
+
+    public void finished() throws ConcurrentException {
+        try {
+            while (!tasks.isEmpty()) {
+                Future<Void> f = completionService.take();
+                tasks.remove(f);
+                f.get();
+            }
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+        } catch (ExecutionException e) {
+            throw ConcurrentException.wrap(e.getCause());
+        } finally {
+            while (!tasks.isEmpty())
+                tasks.poll().cancel(true);
+            executorService.shutdownNow();
+        }
+    }
+
+}
diff --git a/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentSuite.java b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentSuite.java
new file mode 100644
index 0000000..ee3c680
--- /dev/null
+++ b/junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentSuite.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>
+ *
+ * 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.
+ */
+
+package com.mycila.junit.concurrent;
+
+import org.junit.internal.builders.AllDefaultPossibilitiesBuilder;
+import org.junit.runner.Runner;
+import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author Mathieu Carbou (mathieu.carbou@gmail.com)
+ */
+public final class ConcurrentSuite extends Suite {
+    public ConcurrentSuite(Class<?> klass) throws InitializationError {
+        super(klass, new AllDefaultPossibilitiesBuilder(true) {
+            @Override
+            public Runner runnerForClass(Class<?> testClass) throws Throwable {
+                List<RunnerBuilder> builders = Arrays.asList(
+                        new RunnerBuilder() {
+                            @Override
+                            public Runner runnerForClass(Class<?> testClass) throws Throwable {
+                                Concurrency annotation = testClass.getAnnotation(Concurrency.class);
+                                return annotation != null ? new ConcurrentJunitRunner(testClass) : null;
+                            }
+                        },
+                        ignoredBuilder(),
+                        annotatedBuilder(),
+                        suiteMethodBuilder(),
+                        junit3Builder(),
+                        junit4Builder());
+                for (RunnerBuilder each : builders) {
+                    Runner runner = each.safeRunnerForClass(testClass);
+                    if (runner != null)
+                        return runner;
+                }
+                return null;
+            }
+        });
+        int nThreads = 0;
+        if (klass.isAnnotationPresent(Concurrency.class))
+            nThreads = Math.max(0, klass.getAnnotation(Concurrency.class).value());
+        if (nThreads == 0) {
+            SuiteClasses suiteClasses = klass.getAnnotation(SuiteClasses.class);
+            nThreads = suiteClasses != null ? suiteClasses.value().length : Runtime.getRuntime().availableProcessors();
+        }
+        setScheduler(new ConcurrentRunnerScheduler(
+                klass.getSimpleName(),
+                Math.min(Runtime.getRuntime().availableProcessors(), nThreads),
+                nThreads));
+    }
+}
diff --git a/junit-addons/src/main/java/com/mycila/junit/concurrent/NamedThreadFactory.java b/junit-addons/src/main/java/com/mycila/junit/concurrent/NamedThreadFactory.java
new file mode 100644
index 0000000..c90a9bd
--- /dev/null
+++ b/junit-addons/src/main/java/com/mycila/junit/concurrent/NamedThreadFactory.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (C) 2010 Mycila <mathieu.carbou@gmail.com>
+ *
+ * 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.
+ */
+
+package com.mycila.junit.concurrent;
+
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+* @author Mathieu Carbou (mathieu.carbou@gmail.com)
+*/
+final class NamedThreadFactory implements ThreadFactory {
+    static final AtomicInteger poolNumber = new AtomicInteger(1);
+    final AtomicInteger threadNumber = new AtomicInteger(1);
+    final ThreadGroup group;
+
+    NamedThreadFactory(String poolName) {
+        group = new ThreadGroup(poolName + "-" + poolNumber.getAndIncrement());
+    }
+
+    public Thread newThread(Runnable r) {
+        return new Thread(group, r, group.getName() + "-thread-" + threadNumber.getAndIncrement(), 0);
+    }
+}
diff --git a/junit-addons/src/main/java/org/apache/directory/junit/tools/MultiThreadedMultiInvoker.java b/junit-addons/src/main/java/org/apache/directory/junit/tools/MultiThreadedMultiInvoker.java
new file mode 100644
index 0000000..c7fef6e
--- /dev/null
+++ b/junit-addons/src/main/java/org/apache/directory/junit/tools/MultiThreadedMultiInvoker.java
@@ -0,0 +1,190 @@
+/*
+ *  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.directory.junit.tools;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import org.junit.rules.MethodRule;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.Statement;
+
+
+/**
+ * Rule that invokes each test method multiple times using multiple threads.
+ * 
+ * Just put the following two lines to your test.
+ * 
+ * <pre>
+ *     &#064;RuleRule
+ *     public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker();
+ * </pre>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class MultiThreadedMultiInvoker implements MethodRule
+{
+    public static final boolean THREADSAFE = true;
+    public static final boolean NOT_THREADSAFE = false;
+    private static ExecutorService pool = Executors.newCachedThreadPool();
+    private int numThreads;
+    private int numInvocationsPerThread;
+    private boolean trace;
+
+
+    /**
+     * Instantiates a new multi threaded invoker.
+     * 
+     * The number of threads and invocations per thread are derived from 
+     * system properties 'threads' and 'invocations'.
+     * 
+     * @param threadSafe whether the tested class is thread safe
+     */
+    public MultiThreadedMultiInvoker( boolean threadSafe )
+    {
+        this.numThreads = threadSafe ? getSystemIntProperty( "mtmi.threads", 1 ) : 1;
+        this.numInvocationsPerThread = getSystemIntProperty( "mtmi.invocations", 1 );
+        this.trace = getSystemBoolProperty( "mtmi.trace", false );
+    }
+
+
+    private int getSystemIntProperty( String key, int def )
+    {
+        String property = System.getProperty( key, "" + def );
+        int value = Integer.parseInt( property );
+        return value;
+    }
+
+
+    private boolean getSystemBoolProperty( String key, boolean def )
+    {
+        String property = System.getProperty( key, "" + def );
+        boolean value = Boolean.parseBoolean( property );
+        return value;
+    }
+
+
+    /**
+     * Instantiates a new multi threaded multi invoker.
+     *
+     * @param numThreads the number of threads
+     * @param numInvocationsPerThread the number of method invocations per thread
+     */
+    public MultiThreadedMultiInvoker( int numThreads, int numInvocationsPerThread )
+    {
+        super();
+        this.numThreads = numThreads;
+        this.numInvocationsPerThread = numInvocationsPerThread;
+        this.trace = false;
+    }
+
+
+    /**
+     * Instantiates a new multi threaded multi invoker.
+     *
+     * @param numThreads the number of threads
+     * @param numInvocationsPerThread the number of method invocations per thread
+     * @param trace the trace flag
+     */
+    public MultiThreadedMultiInvoker( int numThreads, int numInvocationsPerThread, boolean trace )
+    {
+        super();
+        this.numThreads = numThreads;
+        this.numInvocationsPerThread = numInvocationsPerThread;
+        this.trace = trace;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Statement apply( final Statement base, final FrameworkMethod method, final Object target )
+    {
+        return new Statement()
+        {
+            @Override
+            public void evaluate() throws Throwable
+            {
+                int count = numThreads;
+                if ( method.getAnnotation( NoMultiThreadedInvocation.class ) != null )
+                {
+                    count = 1;
+                }
+
+                final long start = System.currentTimeMillis();
+                final List<Throwable> throwables = Collections.synchronizedList( new ArrayList<Throwable>() );
+
+                final List<Future<Void>> futures = new ArrayList<Future<Void>>();
+                for ( int threadNum = 0; threadNum < count; threadNum++ )
+                {
+                    Callable<Void> c = new Callable<Void>()
+                    {
+                        public Void call() throws Exception
+                        {
+                            try
+                            {
+                                for ( int invocationNum = 0; invocationNum < numInvocationsPerThread; invocationNum++ )
+                                {
+                                    if ( trace )
+                                    {
+                                        long t = System.currentTimeMillis() - start;
+                                        System.out.println( t + " - " + method.getName() + " - "
+                                            + Thread.currentThread().getName() + " - Invocation "
+                                            + ( invocationNum + 1 ) + "/" + numInvocationsPerThread );
+                                    }
+
+                                    base.evaluate();
+                                }
+                            }
+                            catch ( Throwable t )
+                            {
+                                if ( trace )
+                                {
+                                    t.printStackTrace();
+                                }
+                                throwables.add( t );
+                            }
+                            return null;
+                        }
+                    };
+
+                    Future<Void> future = pool.submit( c );
+                    futures.add( future );
+                }
+
+                for ( Future<Void> future : futures )
+                {
+                    future.get();
+                }
+                if ( !throwables.isEmpty() )
+                {
+                    throw throwables.get( 0 );
+                }
+            }
+        };
+    }
+
+}
diff --git a/junit-addons/src/main/java/org/apache/directory/junit/tools/NoMultiThreadedInvocation.java b/junit-addons/src/main/java/org/apache/directory/junit/tools/NoMultiThreadedInvocation.java
new file mode 100644
index 0000000..77f3efc
--- /dev/null
+++ b/junit-addons/src/main/java/org/apache/directory/junit/tools/NoMultiThreadedInvocation.java
@@ -0,0 +1,43 @@
+/*
+ *  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.directory.junit.tools;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * Indicates that a test shouldn't be invoked by multiple threads.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(
+    { ElementType.METHOD })
+public @interface NoMultiThreadedInvocation
+{
+    /**
+     * The optional reason why the test shouldn't be invoked by multiple threads.
+     */
+    String value() default "";
+}
diff --git a/junit-addons/src/site/site.xml b/junit-addons/src/site/site.xml
new file mode 100644
index 0000000..53ec198
--- /dev/null
+++ b/junit-addons/src/site/site.xml
@@ -0,0 +1,48 @@
+<?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.
+-->
+<!--
+  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+-->
+<project name="${project.name}">
+  <bannerLeft>
+    <src>images/server-icon_128x128.png</src>
+    <href>http://directory.apache.org/</href>
+    <name>${project.name}</name>
+  </bannerLeft>
+  <skin>
+    <groupId>org.apache.directory.skins</groupId>
+    <artifactId>directory-skin</artifactId>
+    <version>${skin.version}</version>
+  </skin>
+  <publishDate position="navigation-bottom" format="dd-MM-yyyy HH:mm"/>
+  <version position="right"/>
+  <body>
+    <links>
+       <!--
+         Need to encode a part of the url due to Issue
+         http://jira.codehaus.org/browse/MSITE-159
+         and as of https://bugzilla.mozilla.org/show_bug.cgi?id=43659
+         this workaround doesn't works in FF 3.x ...
+        -->
+       <item name="Apache Directory" href="http://directory.apache%2eorg/"/>
+       <item name="Apache" href="http://www.apache%2eorg/"/>
+       <item name="Maven" href="http://maven.apache%2eorg/"/>
+    </links>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/junit-addons/src/test/java/org/apache/directory/junit/tools/MultiThreadedMultiInvokerNotThreadsafeTest.java b/junit-addons/src/test/java/org/apache/directory/junit/tools/MultiThreadedMultiInvokerNotThreadsafeTest.java
new file mode 100644
index 0000000..f432149
--- /dev/null
+++ b/junit-addons/src/test/java/org/apache/directory/junit/tools/MultiThreadedMultiInvokerNotThreadsafeTest.java
@@ -0,0 +1,128 @@
+package org.apache.directory.junit.tools;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+
+
+public class MultiThreadedMultiInvokerNotThreadsafeTest
+{
+    private static final int NUM_THREADS = 1;
+    private static final int NUM_INVOCATIONS = 1000000;
+    private static final int NUM_METHODS = 10;
+
+    @Rule
+    public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker( NUM_THREADS, NUM_INVOCATIONS );
+
+    private static long counter;
+    private static long startTime;
+
+
+    @BeforeClass
+    public static void initCounter()
+    {
+        counter = 0l;
+    }
+
+
+    @BeforeClass
+    public static void initStartTime()
+    {
+        startTime = System.currentTimeMillis();
+    }
+
+
+    @AfterClass
+    public static void checkCounter()
+    {
+        assertEquals( 1L * NUM_THREADS * NUM_INVOCATIONS * NUM_METHODS, counter );
+    }
+
+
+    @AfterClass
+    public static void checkRuntime()
+    {
+        long endTime = System.currentTimeMillis();
+        long runTime = endTime - startTime;
+        if ( runTime > 10000 )
+        {
+            fail( "Test shut run in less than 10 seconds." );
+        }
+    }
+
+
+    @Test
+    public void test0()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test1()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test2()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test3()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test4()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test5()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test6()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test7()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test8()
+    {
+        counter++;
+    }
+
+
+    @Test
+    public void test9()
+    {
+        counter++;
+    }
+
+}
diff --git a/junit-addons/src/test/java/org/apache/directory/junit/tools/MultiThreadedMultiInvokerThreadsafeTest.java b/junit-addons/src/test/java/org/apache/directory/junit/tools/MultiThreadedMultiInvokerThreadsafeTest.java
new file mode 100644
index 0000000..4c0fa20
--- /dev/null
+++ b/junit-addons/src/test/java/org/apache/directory/junit/tools/MultiThreadedMultiInvokerThreadsafeTest.java
@@ -0,0 +1,130 @@
+package org.apache.directory.junit.tools;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+
+
+public class MultiThreadedMultiInvokerThreadsafeTest
+{
+    private static final int NUM_THREADS = 100;
+    private static final int NUM_INVOCATIONS = 10000;
+    private static final int NUM_METHODS = 10;
+
+    @Rule
+    public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker( NUM_THREADS, NUM_INVOCATIONS );
+
+    private static AtomicLong counter;
+    private static long startTime;
+
+
+    @BeforeClass
+    public static void initCounter()
+    {
+        counter = new AtomicLong( 0L );
+    }
+
+
+    @BeforeClass
+    public static void initStartTime()
+    {
+        startTime = System.currentTimeMillis();
+    }
+
+
+    @AfterClass
+    public static void checkCounter()
+    {
+        assertEquals( 1L * NUM_THREADS * NUM_INVOCATIONS * NUM_METHODS, counter.get() );
+    }
+
+
+    @AfterClass
+    public static void checkRuntime()
+    {
+        long endTime = System.currentTimeMillis();
+        long runTime = endTime - startTime;
+        if ( runTime > 10000 )
+        {
+            fail( "Test shut run in less than 10 seconds." );
+        }
+    }
+
+
+    @Test
+    public void test0()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test1()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test2()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test3()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test4()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test5()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test6()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test7()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test8()
+    {
+        counter.incrementAndGet();
+    }
+
+
+    @Test
+    public void test9()
+    {
+        counter.incrementAndGet();
+    }
+
+}