You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2018/11/29 19:58:19 UTC

[directory-studio] branch remove-jndi-provider-and-jndi-layer updated: Add tests: LDIF with changetypes, use unicode characters.

This is an automated email from the ASF dual-hosted git repository.

seelmann pushed a commit to branch remove-jndi-provider-and-jndi-layer
in repository https://gitbox.apache.org/repos/asf/directory-studio.git


The following commit(s) were added to refs/heads/remove-jndi-provider-and-jndi-layer by this push:
     new 557c14f  Add tests: LDIF with changetypes, use unicode characters.
557c14f is described below

commit 557c14f49faefd80bb3053ed069b5746b953d1df
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Thu Nov 29 20:57:54 2018 +0100

    Add tests: LDIF with changetypes, use unicode characters.
---
 .../ldapbrowser/core/utils/ModelConverter.java     |   2 +-
 .../test/integration/ui/EntryEditorTest.java       |  45 ++++++--
 .../test/integration/ui/ImportExportTest.java      |  61 ++++++++--
 .../test/integration/ui/ProgressViewTest.java      |  19 +--
 .../ui/bots/PasswordEditorDialogBot.java           |   6 +
 .../test/integration/ui/bots/utils/Characters.java |  60 ++++++++++
 .../ui/ImportExportTest_Modifications.ldif         | 127 +++++++++++++++++++++
 7 files changed, 280 insertions(+), 40 deletions(-)

diff --git a/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java b/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java
index 176f355..34e2163 100644
--- a/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java
+++ b/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java
@@ -129,7 +129,7 @@ public class ModelConverter
                 attribute.addValue( new Value( attribute, value ) );
             }
             else if ( !( parts[i] instanceof LdifDnLine ) && !( parts[i] instanceof LdifSepLine )
-                && !( parts[i] instanceof LdifEOFPart ) )
+                && !( parts[i] instanceof LdifEOFPart ) && !( parts[i] instanceof LdifChangeTypeLine ) )
             {
                 String name = parts[i].toRawString();
                 name = name.replaceAll( "\n", "" ); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java
index 5dc9073..91e5446 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java
@@ -32,11 +32,8 @@ import java.io.File;
 import java.io.InputStream;
 import java.net.URL;
 
+import org.apache.commons.lang.RandomStringUtils;
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.server.annotations.CreateLdapServer;
-import org.apache.directory.server.annotations.CreateTransport;
-import org.apache.directory.server.core.annotations.ApplyLdifFiles;
-import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.api.ldap.model.constants.LdapSecurityConstants;
 import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.name.Dn;
@@ -44,7 +41,13 @@ import org.apache.directory.api.ldap.model.password.PasswordUtil;
 import org.apache.directory.api.util.FileUtils;
 import org.apache.directory.api.util.IOUtils;
 import org.apache.directory.api.util.Strings;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.core.annotations.ApplyLdifFiles;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
+import org.apache.directory.studio.ldifparser.LdifFormatParameters;
+import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
 import org.apache.directory.studio.test.integration.ui.bots.BrowserViewBot;
 import org.apache.directory.studio.test.integration.ui.bots.ConnectionsViewBot;
 import org.apache.directory.studio.test.integration.ui.bots.DnEditorDialogBot;
@@ -57,6 +60,7 @@ import org.apache.directory.studio.test.integration.ui.bots.SelectDnDialogBot;
 import org.apache.directory.studio.test.integration.ui.bots.StudioBot;
 import org.apache.directory.studio.test.integration.ui.bots.TextEditorDialogBot;
 import org.apache.directory.studio.test.integration.ui.bots.utils.Assertions;
+import org.apache.directory.studio.test.integration.ui.bots.utils.Characters;
 import org.apache.directory.studio.test.integration.ui.bots.utils.FrameworkRunnerWithScreenshotCaptureListener;
 import org.apache.directory.studio.test.integration.ui.bots.utils.JobWatcher;
 import org.eclipse.core.runtime.Platform;
@@ -76,8 +80,8 @@ import org.junit.runner.RunWith;
 @RunWith(FrameworkRunnerWithScreenshotCaptureListener.class)
 @CreateLdapServer(transports =
     { @CreateTransport(protocol = "LDAP") })
-@ApplyLdifFiles( clazz=EntryEditorTest.class,
-    value = { "org/apache/directory/studio/test/integration/ui/EntryEditorTest.ldif" })
+@ApplyLdifFiles(clazz = EntryEditorTest.class, value =
+    { "org/apache/directory/studio/test/integration/ui/EntryEditorTest.ldif" })
 public class EntryEditorTest extends AbstractLdapTestUnit
 {
     private StudioBot studioBot;
@@ -292,8 +296,9 @@ public class EntryEditorTest extends AbstractLdapTestUnit
         PasswordEditorDialogBot pwdEditorBot = wizardBot.clickFinishButtonExpectingPasswordEditor();
         assertTrue( pwdEditorBot.isVisible() );
 
-        pwdEditorBot.setNewPassword1( "secret" );
-        pwdEditorBot.setNewPassword2( "secret" );
+        String random = RandomStringUtils.random( 20 );
+        pwdEditorBot.setNewPassword1( random );
+        pwdEditorBot.setNewPassword2( random );
         pwdEditorBot.setShowNewPasswordDetails( true );
 
         assertHashMethod( pwdEditorBot, LdapSecurityConstants.HASH_METHOD_MD5, PasswordUtil.MD5_LENGTH, 0 );
@@ -324,7 +329,7 @@ public class EntryEditorTest extends AbstractLdapTestUnit
         pwdEditorBot = entryEditorBot.editValueExpectingPasswordEditor( "userPassword",
             "CRYPT-SHA-512 hashed password" );
         pwdEditorBot.activateCurrentPasswordTab();
-        pwdEditorBot.setVerifyPassword( "secret" );
+        pwdEditorBot.setVerifyPassword( random );
         assertNull( pwdEditorBot.clickVerifyButton() );
         assertNull( pwdEditorBot.clickBindButton() );
 
@@ -335,6 +340,19 @@ public class EntryEditorTest extends AbstractLdapTestUnit
         assertThat( pwdEditorBot.clickBindButton(), startsWith( "The authentication failed" ) );
 
         pwdEditorBot.clickCancelButton();
+
+        // set a new password
+        pwdEditorBot = entryEditorBot.editValueExpectingPasswordEditor( "userPassword",
+            "CRYPT-SHA-512 hashed password" );
+        pwdEditorBot.activateNewPasswordTab();
+        random = RandomStringUtils.random( 20 );
+        pwdEditorBot.setNewPassword1( random );
+        pwdEditorBot.setNewPassword2( random );
+        pwdEditorBot.setShowNewPasswordDetails( true );
+        assertHashMethod( pwdEditorBot, LdapSecurityConstants.HASH_METHOD_SSHA256, PasswordUtil.SHA256_LENGTH, 8 );
+        pwdEditorBot.clickOkButton();
+        SWTUtils.sleep( 1000 );
+        assertTrue( entryEditorBot.getAttributeValues().contains( "userPassword: SSHA-256 hashed password" ) );
     }
 
 
@@ -393,12 +411,15 @@ public class EntryEditorTest extends AbstractLdapTestUnit
         TextEditorDialogBot textEditorBot = entryEditorBot.editValueWithTextEditor( "description",
             "testTextValueEditor 1" );
         assertTrue( textEditorBot.isVisible() );
-        textEditorBot.setText( "testTextValueEditor 2" );
+        String newValue = "testTextValueEditor 2 " + Characters.ALL;
+        textEditorBot.setText( newValue );
         textEditorBot.clickOkButton();
         assertEquals( 9, entryEditorBot.getAttributeValues().size() );
         assertFalse( entryEditorBot.getAttributeValues().contains( "description: testTextValueEditor 1" ) );
-        assertTrue( entryEditorBot.getAttributeValues().contains( "description: testTextValueEditor 2" ) );
-        modificationLogsViewBot.waitForText( "replace: description\ndescription: testTextValueEditor 2" );
+        assertTrue( entryEditorBot.getAttributeValues().contains( "description: " + newValue ) );
+        String description2Ldif = LdifAttrValLine.create( "description", newValue )
+            .toFormattedString( LdifFormatParameters.DEFAULT );
+        modificationLogsViewBot.waitForText( "replace: description\n" + description2Ldif );
     }
 
 
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
index 595c4b9..652c22f 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
@@ -31,15 +31,15 @@ import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.util.List;
 
+import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.api.util.FileUtils;
 import org.apache.directory.api.util.IOUtils;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.annotations.ApplyLdifFiles;
-import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.api.partition.Partition;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.partition.impl.avl.AvlPartition;
-import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -51,12 +51,12 @@ import org.apache.directory.studio.test.integration.ui.bots.ExportWizardBot;
 import org.apache.directory.studio.test.integration.ui.bots.ImportWizardBot;
 import org.apache.directory.studio.test.integration.ui.bots.StudioBot;
 import org.apache.directory.studio.test.integration.ui.bots.utils.Assertions;
+import org.apache.directory.studio.test.integration.ui.bots.utils.Characters;
 import org.apache.directory.studio.test.integration.ui.bots.utils.FrameworkRunnerWithScreenshotCaptureListener;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -70,8 +70,7 @@ import org.junit.runner.RunWith;
 @RunWith(FrameworkRunnerWithScreenshotCaptureListener.class)
 @CreateLdapServer(transports =
     { @CreateTransport(protocol = "LDAP") })
-@ApplyLdifFiles( clazz = ImportExportTest.class,
-    value = "org/apache/directory/studio/test/integration/ui/ImportExportTest.ldif" )
+@ApplyLdifFiles(clazz = ImportExportTest.class, value = "org/apache/directory/studio/test/integration/ui/ImportExportTest.ldif")
 public class ImportExportTest extends AbstractLdapTestUnit
 {
     private StudioBot studioBot;
@@ -136,7 +135,8 @@ public class ImportExportTest extends AbstractLdapTestUnit
         DeleteDialogBot dialogBot = browserViewBot.openDeleteDialog();
         assertTrue( dialogBot.isVisible() );
         dialogBot.clickOkButton();
-        assertFalse( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" ) );
+        assertFalse(
+            browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" ) );
 
         // import LDIF
         ImportWizardBot importWizardBot = browserViewBot.openImportLdifWizard();
@@ -144,7 +144,8 @@ public class ImportExportTest extends AbstractLdapTestUnit
         importWizardBot.clickFinishButton();
 
         // verify that entry with umlaut exists
-        assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" ) );
+        assertTrue(
+            browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" ) );
         browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" );
     }
 
@@ -186,7 +187,8 @@ public class ImportExportTest extends AbstractLdapTestUnit
         DeleteDialogBot dialogBot = browserViewBot.openDeleteDialog();
         assertTrue( dialogBot.isVisible() );
         dialogBot.clickOkButton();
-        assertFalse( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" ) );
+        assertFalse(
+            browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" ) );
 
         // import DSML
         ImportWizardBot importWizardBot = browserViewBot.openImportDsmlWizard();
@@ -194,7 +196,8 @@ public class ImportExportTest extends AbstractLdapTestUnit
         importWizardBot.clickFinishButton();
 
         // verify that entry with umlaut exists
-        assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" ) );
+        assertTrue(
+            browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" ) );
         browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "ou=users", "cn=Wolfgang K\u00f6lbel" );
     }
 
@@ -212,7 +215,7 @@ public class ImportExportTest extends AbstractLdapTestUnit
     public void testImportContextEntryRefreshesRootDSE() throws Exception
     {
         // add a new partition
-        Partition partition = new AvlPartition(service.getSchemaManager(), service.getDnFactory());
+        Partition partition = new AvlPartition( service.getSchemaManager(), service.getDnFactory() );
         partition.setId( "example" );
         partition.setSuffixDn( new Dn( "dc=example,dc=com" ) );
         service.addPartition( partition );
@@ -341,4 +344,42 @@ public class ImportExportTest extends AbstractLdapTestUnit
             .contains( "description: person#homeEmailAddress#jhon.doe@apache.com" ) );
         assertTrue( entryEditorBot.getAttributeValues().contains( "description: Th\u00f6is \u00e5s a t\u00e4st yes" ) );
     }
+
+
+    /**
+     * Test LDIF with several modifications.
+     */
+    @Test
+    public void testLdifModification() throws Exception
+    {
+        URL url = Platform.getInstanceLocation().getURL();
+        String destFile = url.getFile() + "ImportExportTest_Modifications.ldif";
+        InputStream is = getClass().getResourceAsStream( "ImportExportTest_Modifications.ldif" );
+        String ldifContent = IOUtils.toString( is, StandardCharsets.UTF_8 );
+        FileUtils.writeStringToFile( new File( destFile ), ldifContent, StandardCharsets.UTF_8, false );
+
+        // import the LDIF
+        ImportWizardBot importWizardBot = browserViewBot.openImportLdifWizard();
+        importWizardBot.typeFile( destFile );
+        importWizardBot.clickFinishButton();
+
+        browserViewBot.waitForEntry( "DIT", "Root DSE", "ou=system", "ou=users", "uid=user.1" );
+        browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "ou=users", "uid=user.1" );
+        EntryEditorBot entryEditorBot = studioBot.getEntryEditorBot( "uid=user.1,ou=users,ou=system" );
+        entryEditorBot.activate();
+        assertTrue( entryEditorBot.getAttributeValues().contains( "description: " + Characters.ALL ) );
+        assertTrue( entryEditorBot.getAttributeValues().contains( "roomNumber: 0000" ) );
+        assertTrue( entryEditorBot.getAttributeValues().contains( "roomNumber: 1234" ) );
+        assertTrue( entryEditorBot.getAttributeValues().contains( "roomNumber: 2345" ) );
+        assertTrue( entryEditorBot.getAttributeValues().contains( "roomNumber: 3456" ) );
+
+        assertFalse( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users", "uid=user.2" ) );
+
+        browserViewBot.waitForEntry( "DIT", "Root DSE", "ou=system", "ou=users", "uid=user.33" );
+        browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "ou=users", "uid=user.33" );
+        entryEditorBot.activate();
+        assertTrue( entryEditorBot.getAttributeValues().contains( "uid: user.33" ) );
+        assertFalse( entryEditorBot.getAttributeValues().contains( "uid: user.3" ) );
+    }
+
 }
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ProgressViewTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ProgressViewTest.java
index aa59504..5e19dc8 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ProgressViewTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ProgressViewTest.java
@@ -21,20 +21,14 @@
 package org.apache.directory.studio.test.integration.ui;
 
 
-import static org.junit.Assert.fail;
-
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
-import org.apache.directory.studio.connection.core.Messages;
-import org.apache.directory.studio.test.integration.ui.bots.BotUtils;
 import org.apache.directory.studio.test.integration.ui.bots.ConnectionsViewBot;
 import org.apache.directory.studio.test.integration.ui.bots.ProgressViewBot;
 import org.apache.directory.studio.test.integration.ui.bots.StudioBot;
 import org.apache.directory.studio.test.integration.ui.bots.utils.Assertions;
 import org.apache.directory.studio.test.integration.ui.bots.utils.FrameworkRunnerWithScreenshotCaptureListener;
-import org.eclipse.core.runtime.jobs.IJobManager;
-import org.eclipse.core.runtime.jobs.Job;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -86,17 +80,8 @@ public class ProgressViewTest extends AbstractLdapTestUnit
         connectionView.createTestConnection( "ProgressViewTest", ldapServer.getPort() );
         connectionView.createTestConnection( "ProgressViewTest", ldapServer.getPort() );
         connectionView.createTestConnection( "ProgressViewTest", ldapServer.getPort() );
-        BotUtils.sleep( 1000L );
-
-        IJobManager jobManager = Job.getJobManager();
-        Job[] jobs = jobManager.find( null );
-        for ( Job job : jobs )
-        {
-            if ( job.getName().equals( Messages.jobs__open_connections_name_1 ) )
-            {
-                fail( "No 'Open Connection' job expected" );
-            }
-        }
+
+        // actual assertion is done in Assertions.genericTearDownAssertions()
     }
 
 }
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/PasswordEditorDialogBot.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/PasswordEditorDialogBot.java
index 37fd8c3..6016ec1 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/PasswordEditorDialogBot.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/PasswordEditorDialogBot.java
@@ -99,6 +99,12 @@ public class PasswordEditorDialogBot extends DialogBot
     }
 
 
+    public void activateNewPasswordTab()
+    {
+        bot.tabItem( "New Password" ).activate();
+    }
+
+
     public void setVerifyPassword( String password )
     {
         bot.text( 4 ).setText( password );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/utils/Characters.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/utils/Characters.java
new file mode 100644
index 0000000..ed3d8d6
--- /dev/null
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/utils/Characters.java
@@ -0,0 +1,60 @@
+package org.apache.directory.studio.test.integration.ui.bots.utils;
+
+
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+import org.junit.Test;
+
+
+public class Characters
+{
+    public static final String LATIN_A = "A";
+    public static final String LATIN_E_ACUTE = "\u00E9";
+    public static final String EURO = "\u20AC";
+    public static final String CYRILLIC_YA = "\u042F";
+    public static final String GREEK_LAMBDA = "\u03BB";
+    public static final String HEBREW_SHIN = "\u05E9";
+    public static final String ARABIC_AIN = "\u0639";
+    public static final String CJK_RADICAL_HEAD = "\u2EE1";
+    public static final String SMILEY = "\uD83D\uDE08";
+
+    public static final String ALL = "" +
+        LATIN_A + " " +
+        LATIN_E_ACUTE + " " +
+        EURO + " " +
+        CYRILLIC_YA + " " +
+        GREEK_LAMBDA + " " +
+        HEBREW_SHIN + " " +
+        ARABIC_AIN + " " +
+        CJK_RADICAL_HEAD + " " 
+//        SMILEY + " "
+        ;
+
+    public static final String ALL_UTF8_BASE64 = toUtf8Base64( ALL );
+
+
+    public static final String toUtf8Base64( String s )
+    {
+        return Base64.getEncoder()
+            .encodeToString( s.getBytes( StandardCharsets.UTF_8 ) );
+    }
+
+
+    @Test
+    public void print()
+    {
+        System.out.println( LATIN_A );
+        System.out.println( LATIN_E_ACUTE );
+        System.out.println( EURO );
+        System.out.println( CYRILLIC_YA );
+        System.out.println( GREEK_LAMBDA );
+        System.out.println( HEBREW_SHIN );
+        System.out.println( ARABIC_AIN );
+        System.out.println( CJK_RADICAL_HEAD );
+        System.out.println( SMILEY );
+        System.out.println( ALL );
+        System.out.println( ALL_UTF8_BASE64 );
+    }
+
+}
diff --git a/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/ImportExportTest_Modifications.ldif b/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/ImportExportTest_Modifications.ldif
new file mode 100644
index 0000000..c9672be
--- /dev/null
+++ b/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/ImportExportTest_Modifications.ldif
@@ -0,0 +1,127 @@
+#  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.
+#
+dn: uid=user.1,ou=users,ou=system
+changetype: add
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Aaccf
+sn: Amar
+cn: Aaccf Amar
+initials: AA
+uid: user.1
+mail: user.1@null
+userPassword: password
+telephoneNumber: 976-893-3312
+homePhone: 337-310-0727
+pager: 185-156-4071
+mobile: 626-188-0934
+employeeNumber: 1
+street: 27919 Broadway Street
+l: Tallahassee
+st: DE
+postalCode: 67698
+postalAddress: Aaccf Amar$27919 Broadway Street$Tallahassee, DE  67698
+description: This is the description for Aaccf Amar.
+roomNumber: 0000
+
+dn: uid=user.2,ou=users,ou=system
+changetype: add
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Aaren
+sn: Atp
+cn: Aaren Atp
+initials: AA
+uid: user.2
+mail: user.2@null
+userPassword: password
+telephoneNumber: 147-953-0396
+homePhone: 174-439-5329
+pager: 617-443-8449
+mobile: 045-464-2512
+employeeNumber: 2
+street: 36109 Center Street
+l: Harlingen
+st: CO
+postalCode: 21733
+postalAddress: Aaren Atp$36109 Center Street$Harlingen, CO  21733
+description: This is the description for Aaren Atp.
+roomNumber: 1198
+
+dn: uid=user.3,ou=users,ou=system
+changetype: add
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Aarika
+sn: Atpco
+cn: Aarika Atpco
+initials: AA
+uid: user.3
+mail: user.3@null
+userPassword: password
+telephoneNumber: 925-356-4943
+homePhone: 099-983-0308
+pager: 806-672-7363
+mobile: 425-493-8009
+employeeNumber: 3
+street: 14730 Fourteenth Street
+l: Evansville
+st: ND
+postalCode: 95526
+postalAddress: Aarika Atpco$14730 Fourteenth Street$Evansville, ND  95526
+description: This is the description for Aarika Atpco.
+roomNumber: 1135
+
+dn: uid=user.1,ou=users,ou=system
+changetype: modify
+delete: initials
+initials: AA
+-
+delete: l
+-
+add: description
+description:: QSDDqSDigqwg0K8gzrsg16kg2Lkg4ruhIA==
+-
+add: roomNumber
+roomNumber: 1234
+roomNumber: 2345
+roomNumber: 3456
+-
+replace: street
+-
+replace: employeeType
+employeeType: Intern
+-
+replace: mail
+mail: mail: user.1@example.com
+mail: mail: Aaccf.Amar@example.com
+
+
+dn: uid=user.2,ou=users,ou=system
+changetype: delete
+
+dn: uid=user.3,ou=users,ou=system
+changetype: moddn
+newrdn: uid=user.33
+deleteoldrdn: 1