directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235364 [5/27] - in /directory/shared/trunk: asn1/api/src/main/java/org/apache/directory/shared/asn1/util/ asn1/api/src/test/java/org/apache/directory/shared/asn1/util/ asn1/ber/src/main/java/org/apache/directory/shared/asn1/actions/ asn1/...
Date Tue, 24 Jan 2012 17:27:12 GMT
Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java (original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java Tue Jan 24 17:27:00 2012
@@ -37,6 +37,7 @@ import org.junit.runner.RunWith;
 import com.mycila.junit.concurrent.Concurrency;
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 
+
 /**
  * Unit tests class for ACIItem parser (wrapper).
  * 
@@ -84,14 +85,13 @@ public class ACIItemParserTest
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
-        
-        
+
         spec = " { identificationTag \"id8\", precedence 0, authenticationLevel simple "
             + ", itemOrUserFirst userFirst: { userClasses { allUsers }, userPermissions { "
             + " { protectedItems { rangeOfValues (&(cn=test)(sn=test)) }, grantsAndDenials { grantAdd } }, "
             + "{ protectedItems { rangeOfValues (|(!(cn=aaa))(sn=bbb)) }, grantsAndDenials { grantAdd } } "
             + " } } }";
-        
+
         item = parser.parse( spec );
         checkItemToString( spec, item );
     }
@@ -103,41 +103,41 @@ public class ACIItemParserTest
     @Test
     public void testItemFirst() throws Exception
     {
-        String spec = 
+        String spec =
             "{  " +
-            "  identificationTag  \"id1\" , " +
-            "  precedence 114  , " +
-            "  authenticationLevel simple  , " +
-            "  itemOrUserFirst itemFirst  :" +
-            "  { " +
-            "    protectedItems  { entry  , attributeType { 2.5.4.3    , ou } , " +
-            "    attributeValue { ou=people  , cn=Ersin  }  , " +
-            "    rangeOfValues (cn=ErsinEr) , " +
-            "    classes and : { item: xyz , or:{item:X,item:Y}   }" +
-            "  }  , " +
-            "  itemPermissions " +
-            "  { " +
-            "    { " +
-            "      userClasses " +
-            "        {" +
-            "          allUsers  , " +
-            "          userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } , " +
-            "          subtree { { base \"ou=people\" } } " +
-            "        }   , " +
-            "      grantsAndDenials  {  denyCompare  , grantModify } " +
-            "    }," +
-            "    { " +
-            "      precedence 10, " +
-            "      userClasses " +
-            "      {" +
-            "        allUsers  , " +
-            "        userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } ," +
-            "        subtree { { base \"ou=people\" } } " +
-            "      }   , " +
-            "      grantsAndDenials  {  denyCompare  , grantModify } } " +
-            "    } " +
-            "  }" +
-            "}";
+                "  identificationTag  \"id1\" , " +
+                "  precedence 114  , " +
+                "  authenticationLevel simple  , " +
+                "  itemOrUserFirst itemFirst  :" +
+                "  { " +
+                "    protectedItems  { entry  , attributeType { 2.5.4.3    , ou } , " +
+                "    attributeValue { ou=people  , cn=Ersin  }  , " +
+                "    rangeOfValues (cn=ErsinEr) , " +
+                "    classes and : { item: xyz , or:{item:X,item:Y}   }" +
+                "  }  , " +
+                "  itemPermissions " +
+                "  { " +
+                "    { " +
+                "      userClasses " +
+                "        {" +
+                "          allUsers  , " +
+                "          userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } , " +
+                "          subtree { { base \"ou=people\" } } " +
+                "        }   , " +
+                "      grantsAndDenials  {  denyCompare  , grantModify } " +
+                "    }," +
+                "    { " +
+                "      precedence 10, " +
+                "      userClasses " +
+                "      {" +
+                "        allUsers  , " +
+                "        userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } ," +
+                "        subtree { { base \"ou=people\" } } " +
+                "      }   , " +
+                "      grantsAndDenials  {  denyCompare  , grantModify } } " +
+                "    } " +
+                "  }" +
+                "}";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
@@ -147,52 +147,52 @@ public class ACIItemParserTest
     /**
      * Tests the parser with an ACIItem of UserFirst main component.
      */
-    @Test 
+    @Test
     public void testUserFirst() throws Exception
     {
-        String spec = 
+        String spec =
             "{ " +
-            "  identificationTag \"id2\"   , " +
-            "  precedence 14, " +
-            "  authenticationLevel none  , " +
-            "  itemOrUserFirst userFirst:  " +
-            "  { " +
-            "    userClasses " +
-            "    {  " +
-            "      allUsers  , " +
-            "      name { \"ou=people,cn=ersin\" }, " +
-            "      subtree " +
-            "      {" +
-            "        { base \"ou=system\" }, " +
-            "        { " +
-            "          base \"ou=ORGANIZATIONUNIT\"," +
-            "          minimum  1, " +
-            "          maximum   2 " +
-            "        } " +
-            "      } " +
-            "    }  , " +
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems" +
-            "        { " +
-            "          entry  , " +
-            "          attributeType { cn  , ou }  , " +
-            "          attributeValue {cn=y,sn=n,dc=l} , " +
-            "          rangeOfValues (cn=ErsinEr) " +
-            "        }  , " +
-            "        grantsAndDenials { grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  }  " +
-            "}   ";
+                "  identificationTag \"id2\"   , " +
+                "  precedence 14, " +
+                "  authenticationLevel none  , " +
+                "  itemOrUserFirst userFirst:  " +
+                "  { " +
+                "    userClasses " +
+                "    {  " +
+                "      allUsers  , " +
+                "      name { \"ou=people,cn=ersin\" }, " +
+                "      subtree " +
+                "      {" +
+                "        { base \"ou=system\" }, " +
+                "        { " +
+                "          base \"ou=ORGANIZATIONUNIT\"," +
+                "          minimum  1, " +
+                "          maximum   2 " +
+                "        } " +
+                "      } " +
+                "    }  , " +
+                "    userPermissions " +
+                "    { " +
+                "      { " +
+                "        protectedItems" +
+                "        { " +
+                "          entry  , " +
+                "          attributeType { cn  , ou }  , " +
+                "          attributeValue {cn=y,sn=n,dc=l} , " +
+                "          rangeOfValues (cn=ErsinEr) " +
+                "        }  , " +
+                "        grantsAndDenials { grantBrowse } " +
+                "      } " +
+                "    } " +
+                "  }  " +
+                "}   ";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
     }
 
 
-    @Test 
+    @Test
     public void testAllowAddAllUsers() throws Exception
     {
         String spec = "{ identificationTag \"addAci\", " + "precedence 14, " + "authenticationLevel none, "
@@ -204,7 +204,7 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testCombo() throws Exception
     {
         String spec = "{ identificationTag \"addAci\", " + "precedence 14, " + "authenticationLevel none, "
@@ -216,109 +216,109 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testOrderOfProtectedItemsDoesNotMatter() throws Exception
     {
-        String spec = 
+        String spec =
             " {  " +
-            "   identificationTag  \"id1\" , " +
-            "   precedence 114  , " +
-            "   authenticationLevel simple  , " +
-            "   itemOrUserFirst itemFirst  :" +
-            "   { " +
-            "     protectedItems  " +
-            "     { " +
-            "       attributeType { 2.5.4.3    , ou }, " +
-            "       entry , " +
-            "       rangeOfValues (cn=ErsinEr) , " +
-            "       attributeValue { ou=people  , cn=Ersin  }," +
-            "       classes and : " +
-            "       { item: xyz , or:{item:X,item:Y}   }" +
-            "     }  , " +
-            "     itemPermissions " +
-            "     { " +
-            "       { " +
-            "         userClasses " +
-            "         {" +
-            "           allUsers  , " +
-            "           userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,sn=d\" } " +
-            "           , " +
-            "           subtree " +
-            "           { " +
-            "             { base \"ou=people\" } " +
-            "           } " +
-            "         }   , " +
-            "         grantsAndDenials  " +
-            "         {  " +
-            "           denyCompare  , " +
-            "           grantModify " +
-            "         } " +
-            "       }," +
-            "       { " +
-            "         precedence 10, " +
-            "         userClasses " +
-            "         {" +
-            "           allUsers  , " +
-            "           userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } " +
-            "           , subtree { { base \"ou=people\" } } " +
-            "         }   , " +
-            "         grantsAndDenials  {  denyCompare  , grantModify } " +
-            "       } " +
-            "     } " +
-            "   }" +
-            " }";
+                "   identificationTag  \"id1\" , " +
+                "   precedence 114  , " +
+                "   authenticationLevel simple  , " +
+                "   itemOrUserFirst itemFirst  :" +
+                "   { " +
+                "     protectedItems  " +
+                "     { " +
+                "       attributeType { 2.5.4.3    , ou }, " +
+                "       entry , " +
+                "       rangeOfValues (cn=ErsinEr) , " +
+                "       attributeValue { ou=people  , cn=Ersin  }," +
+                "       classes and : " +
+                "       { item: xyz , or:{item:X,item:Y}   }" +
+                "     }  , " +
+                "     itemPermissions " +
+                "     { " +
+                "       { " +
+                "         userClasses " +
+                "         {" +
+                "           allUsers  , " +
+                "           userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,sn=d\" } " +
+                "           , " +
+                "           subtree " +
+                "           { " +
+                "             { base \"ou=people\" } " +
+                "           } " +
+                "         }   , " +
+                "         grantsAndDenials  " +
+                "         {  " +
+                "           denyCompare  , " +
+                "           grantModify " +
+                "         } " +
+                "       }," +
+                "       { " +
+                "         precedence 10, " +
+                "         userClasses " +
+                "         {" +
+                "           allUsers  , " +
+                "           userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } " +
+                "           , subtree { { base \"ou=people\" } } " +
+                "         }   , " +
+                "         grantsAndDenials  {  denyCompare  , grantModify } " +
+                "       } " +
+                "     } " +
+                "   }" +
+                " }";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
     }
 
 
-    @Test 
+    @Test
     public void testOrderOfUserClassesDoesNotMatter() throws Exception
     {
-        String spec = 
+        String spec =
             "{ " +
-            "  identificationTag \"id2\"   , " +
-            "  precedence 14, " +
-            "  authenticationLevel none  , " +
-            "  itemOrUserFirst userFirst:  " +
-            "  { " +
-            "    userClasses " +
-            "    {  " +
-            "      name { \"ou=people,cn=ersin\" }, " +
-            "      allUsers, " +
-            "      subtree " +
-            "      {" +
-            "        { base \"ou=system\" }, " +
-            "        { " +
-            "          base \"ou=ORGANIZATIONUNIT\"," +
-            "          minimum  1, " +
-            "          maximum   2 " +
-            "        } " +
-            "      } " +
-            "    }  , " +
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems" +
-            "        { " +
-            "          entry  , " +
-            "          attributeType { cn  , ou }  , " +
-            "          attributeValue {cn=y,sn=n,dc=l} , " +
-            "          rangeOfValues (cn=ErsinEr) " +
-            "        }  , " +
-            "        grantsAndDenials { grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  }  " +
-            "}";
+                "  identificationTag \"id2\"   , " +
+                "  precedence 14, " +
+                "  authenticationLevel none  , " +
+                "  itemOrUserFirst userFirst:  " +
+                "  { " +
+                "    userClasses " +
+                "    {  " +
+                "      name { \"ou=people,cn=ersin\" }, " +
+                "      allUsers, " +
+                "      subtree " +
+                "      {" +
+                "        { base \"ou=system\" }, " +
+                "        { " +
+                "          base \"ou=ORGANIZATIONUNIT\"," +
+                "          minimum  1, " +
+                "          maximum   2 " +
+                "        } " +
+                "      } " +
+                "    }  , " +
+                "    userPermissions " +
+                "    { " +
+                "      { " +
+                "        protectedItems" +
+                "        { " +
+                "          entry  , " +
+                "          attributeType { cn  , ou }  , " +
+                "          attributeValue {cn=y,sn=n,dc=l} , " +
+                "          rangeOfValues (cn=ErsinEr) " +
+                "        }  , " +
+                "        grantsAndDenials { grantBrowse } " +
+                "      } " +
+                "    } " +
+                "  }  " +
+                "}";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
     }
 
 
-    @Test 
+    @Test
     public void testOrderOfProtectedItemsDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel simple  , "
@@ -342,7 +342,7 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testOrderOfUserClassesDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel none  , "
@@ -364,58 +364,58 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testItemPermissionComponentsOrderDoesNotMatter() throws Exception
     {
-        String spec = 
+        String spec =
             " {  " +
-            "   identificationTag  \"id1\" , " +
-            "   precedence 114  , " +
-            "   authenticationLevel simple  , " +
-            "   itemOrUserFirst itemFirst  :" +
-            "   { " +
-            "     protectedItems  " +
-            "     { " +
-            "       attributeType { 2.5.4.3    , ou }, " +
-            "       entry , " +
-            "       rangeOfValues (cn=ErsinEr) , " +
-            "       attributeValue { ou=people  , cn=Ersin  }," +
-            "       classes and : { item: xyz , or:{item:X,item:Y}   }" +
-            "     }  , " +
-            "     itemPermissions " +
-            "     { " +
-            "       { " +
-            "         grantsAndDenials  " +
-            "         {  " +
-            "           denyCompare  , grantModify " +
-            "         }, " +
-            "         userClasses " +
-            "         {" +
-            "           allUsers  , " +
-            "           userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } " +
-            "           , subtree { { base \"ou=people\" } } " +
-            "         }   " +
-            "       }," +
-            "       { " +
-            "         precedence 10, " +
-            "         userClasses " +
-            "         {" +
-            "           allUsers  , " +
-            "           userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } " +
-            "           , subtree { { base \"ou=people\" } } " +
-            "         }   , " +
-            "         grantsAndDenials  {  denyCompare  , grantModify } " +
-            "       } " +
-            "     } " +
-            "   }" +
-            " }";
+                "   identificationTag  \"id1\" , " +
+                "   precedence 114  , " +
+                "   authenticationLevel simple  , " +
+                "   itemOrUserFirst itemFirst  :" +
+                "   { " +
+                "     protectedItems  " +
+                "     { " +
+                "       attributeType { 2.5.4.3    , ou }, " +
+                "       entry , " +
+                "       rangeOfValues (cn=ErsinEr) , " +
+                "       attributeValue { ou=people  , cn=Ersin  }," +
+                "       classes and : { item: xyz , or:{item:X,item:Y}   }" +
+                "     }  , " +
+                "     itemPermissions " +
+                "     { " +
+                "       { " +
+                "         grantsAndDenials  " +
+                "         {  " +
+                "           denyCompare  , grantModify " +
+                "         }, " +
+                "         userClasses " +
+                "         {" +
+                "           allUsers  , " +
+                "           userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } " +
+                "           , subtree { { base \"ou=people\" } } " +
+                "         }   " +
+                "       }," +
+                "       { " +
+                "         precedence 10, " +
+                "         userClasses " +
+                "         {" +
+                "           allUsers  , " +
+                "           userGroup { \"2.5.4.3=y,dc=t\"  , \"cn=b,dc=d\" } " +
+                "           , subtree { { base \"ou=people\" } } " +
+                "         }   , " +
+                "         grantsAndDenials  {  denyCompare  , grantModify } " +
+                "       } " +
+                "     } " +
+                "   }" +
+                " }";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
     }
 
 
-    @Test 
+    @Test
     public void testItemPermissionComponentsOrderDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel simple  , "
@@ -440,52 +440,52 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testUserPermissionComponentsOrderDoesNotMatter() throws Exception
     {
-        String spec = 
+        String spec =
             "{ " +
-            "  identificationTag \"id2\"   , " +
-            "  precedence 14, " +
-            "  authenticationLevel none  , " +
-            "  itemOrUserFirst userFirst:  " +
-            "  { " +
-            "    userClasses " +
-            "    {  " +
-            "      allUsers  , " +
-            "      name { \"ou=people,cn=ersin\" }, " +
-            "      subtree " +
-            "      {" +
-            "        { base \"ou=system\" }, " +
-            "        { " +
-            "          base \"ou=ORGANIZATIONUNIT\"," +
-            "          minimum  1, " +
-            "          maximum   2 " +
-            "        } " +
-            "      } " +
-            "    }  , " +
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        grantsAndDenials { grantBrowse }, " +
-            "        protectedItems" +
-            "        { " +
-            "          entry  , " +
-            "          attributeType { cn  , ou }  , " +
-            "          attributeValue {cn=y,sn=n,dc=l} , " +
-            "          rangeOfValues (cn=ErsinEr) " +
-            "        }  " +
-            "      } " +
-            "    } " +
-            "  }  " +
-            "}   ";
+                "  identificationTag \"id2\"   , " +
+                "  precedence 14, " +
+                "  authenticationLevel none  , " +
+                "  itemOrUserFirst userFirst:  " +
+                "  { " +
+                "    userClasses " +
+                "    {  " +
+                "      allUsers  , " +
+                "      name { \"ou=people,cn=ersin\" }, " +
+                "      subtree " +
+                "      {" +
+                "        { base \"ou=system\" }, " +
+                "        { " +
+                "          base \"ou=ORGANIZATIONUNIT\"," +
+                "          minimum  1, " +
+                "          maximum   2 " +
+                "        } " +
+                "      } " +
+                "    }  , " +
+                "    userPermissions " +
+                "    { " +
+                "      { " +
+                "        grantsAndDenials { grantBrowse }, " +
+                "        protectedItems" +
+                "        { " +
+                "          entry  , " +
+                "          attributeType { cn  , ou }  , " +
+                "          attributeValue {cn=y,sn=n,dc=l} , " +
+                "          rangeOfValues (cn=ErsinEr) " +
+                "        }  " +
+                "      } " +
+                "    } " +
+                "  }  " +
+                "}   ";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
     }
 
 
-    @Test 
+    @Test
     public void testUserPermissionComponentsOrderDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel none  , "
@@ -507,52 +507,52 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testOrderOfMainACIComponentsDoesNotMatter() throws Exception
     {
-        String spec = 
+        String spec =
             "{   " +
-            "  itemOrUserFirst userFirst:  " +
-            "  { " +
-            "    userClasses " +
-            "    {  " +
-            "      allUsers  , " +
-            "      name { \"ou=people,cn=ersin\" }, " +
-            "      subtree " +
-            "      {" +
-            "        { base \"ou=system\" }, " +
-            "        { " +
-            "          base \"ou=ORGANIZATIONUNIT\"," +
-            "          minimum  1, " +
-            "          maximum   2 " +
-            "        } " +
-            "      } " +
-            "    }  , " +
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems" +
-            "        { " +
-            "          entry  , " +
-            "          attributeType { cn  , ou }  , " +
-            "          attributeValue {cn=y,sn=n,dc=l} , " +
-            "          rangeOfValues (cn=ErsinEr) " +
-            "        }  , " +
-            "        grantsAndDenials { grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  }, " +
-            "  identificationTag \"id2\"   , " +
-            "  authenticationLevel none, " +
-            "  precedence 14 " +
-            "}   ";
+                "  itemOrUserFirst userFirst:  " +
+                "  { " +
+                "    userClasses " +
+                "    {  " +
+                "      allUsers  , " +
+                "      name { \"ou=people,cn=ersin\" }, " +
+                "      subtree " +
+                "      {" +
+                "        { base \"ou=system\" }, " +
+                "        { " +
+                "          base \"ou=ORGANIZATIONUNIT\"," +
+                "          minimum  1, " +
+                "          maximum   2 " +
+                "        } " +
+                "      } " +
+                "    }  , " +
+                "    userPermissions " +
+                "    { " +
+                "      { " +
+                "        protectedItems" +
+                "        { " +
+                "          entry  , " +
+                "          attributeType { cn  , ou }  , " +
+                "          attributeValue {cn=y,sn=n,dc=l} , " +
+                "          rangeOfValues (cn=ErsinEr) " +
+                "        }  , " +
+                "        grantsAndDenials { grantBrowse } " +
+                "      } " +
+                "    } " +
+                "  }, " +
+                "  identificationTag \"id2\"   , " +
+                "  authenticationLevel none, " +
+                "  precedence 14 " +
+                "}   ";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
     }
 
 
-    @Test 
+    @Test
     public void testOrderOfMainACIComponentsDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = "{   itemOrUserFirst userFirst:  { userClasses {  allUsers  , name { \"ou=people,cn=ersin\" }, "
@@ -574,7 +574,7 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testOrderOfMainACIComponentsDoesNotMatterButMissingsMatter() throws Exception
     {
         String spec = "{   itemOrUserFirst userFirst:  { userClasses {  allUsers  , name { \"ou=people,cn=ersin\" }, "
@@ -596,7 +596,7 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testGrantAndDenialBitsOrderDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel none  , "
@@ -615,50 +615,50 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testMaxValueCountComponentsOrderDoesNotMatter() throws Exception
     {
-        String spec = 
+        String spec =
             "{ " +
-            "  identificationTag \"id2\"   , " +
-            "  precedence 14, " +
-            "  authenticationLevel none  , " +
-            "  itemOrUserFirst userFirst:  " +
-            "  { " +
-            "    userClasses " +
-            "    {  " +
-            "      allUsers  , " +
-            "      name { \"ou=people,cn=ersin\" }, " +
-            "      subtree " +
-            "      {" +
-            "        { base \"ou=system\"}, " +
-            "        { base \"ou=ORGANIZATIONUNIT\", minimum  1, maximum   2 } " +
-            "      } " +
-            "    }  , "+
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems" +
-            "        { " +
-            "          entry  , " +
-            "          maxValueCount " +
-            "          { " +
-            "            { type 2.5.4.3, maxCount 10 }, " +
-            "            { maxCount 20, type 2.5.4.3  } " +
-            "          } " +
-            "        }  , " +
-            "        grantsAndDenials { grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}   ";
+                "  identificationTag \"id2\"   , " +
+                "  precedence 14, " +
+                "  authenticationLevel none  , " +
+                "  itemOrUserFirst userFirst:  " +
+                "  { " +
+                "    userClasses " +
+                "    {  " +
+                "      allUsers  , " +
+                "      name { \"ou=people,cn=ersin\" }, " +
+                "      subtree " +
+                "      {" +
+                "        { base \"ou=system\"}, " +
+                "        { base \"ou=ORGANIZATIONUNIT\", minimum  1, maximum   2 } " +
+                "      } " +
+                "    }  , " +
+                "    userPermissions " +
+                "    { " +
+                "      { " +
+                "        protectedItems" +
+                "        { " +
+                "          entry  , " +
+                "          maxValueCount " +
+                "          { " +
+                "            { type 2.5.4.3, maxCount 10 }, " +
+                "            { maxCount 20, type 2.5.4.3  } " +
+                "          } " +
+                "        }  , " +
+                "        grantsAndDenials { grantBrowse } " +
+                "      } " +
+                "    } " +
+                "  } " +
+                "}   ";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
     }
 
 
-    @Test 
+    @Test
     public void testRestrictedValueComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel none  , "
@@ -673,7 +673,7 @@ public class ACIItemParserTest
     }
 
 
-    @Test 
+    @Test
     public void testMaxImmSubComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel none  , "
@@ -681,20 +681,20 @@ public class ACIItemParserTest
             + "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," + "minimum  1, maximum   2 } } }  , "
             + "userPermissions { { protectedItems{ entry  , maxImmSub 5 "
             + " }  , grantsAndDenials { grantBrowse } } } }  }   ";
-        
+
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
     }
-    
-    
+
+
     /**
      * Test case for DIRSERVER-891
      */
-    @Test 
+    @Test
     public void testInvalidAttributeValue()
     {
         String spec;
-        
+
         // no name-value-pair
         spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel none  , "
             + "itemOrUserFirst userFirst:  { userPermissions { { protectedItems{ entry  , attributeType { cn  , ou }  , attributeValue { must_be_a_name_value_pair } , "
@@ -704,13 +704,13 @@ public class ACIItemParserTest
         try
         {
             parser.parse( spec );
-            fail("Expected ParseException, invalid protected item 'attributeValue { must_be_a_name_value_pair }'");
+            fail( "Expected ParseException, invalid protected item 'attributeValue { must_be_a_name_value_pair }'" );
         }
         catch ( ParseException e )
         {
             // Expected
         }
-        
+
         // no name-value-pair
         spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel none  , "
             + "itemOrUserFirst userFirst:  { userPermissions { { protectedItems{ entry  , attributeType { cn  , ou }  , attributeValue { x=y,m=n,k=l,x } , "
@@ -720,53 +720,54 @@ public class ACIItemParserTest
         try
         {
             parser.parse( spec );
-            fail("Expected ParseException, invalid protected item 'attributeValue { x=y,m=n,k=l,x }'");
+            fail( "Expected ParseException, invalid protected item 'attributeValue { x=y,m=n,k=l,x }'" );
         }
         catch ( ParseException e )
         {
             // Expected
         }
     }
-    
-    @Test 
+
+
+    @Test
     public void testUserClassParentOfEntry() throws Exception
     {
-        String spec = 
+        String spec =
             "{ " +
-            "  identificationTag \"id\"   , " +
-            "  precedence 10, " +
-            "  authenticationLevel none  , " +
-            "  itemOrUserFirst userFirst:  " +
-            "  { " +
-            "    userClasses " +
-            "    {  " +
-            "      parentOfEntry  , " +
-            "      name { \"cn=ersin,ou=people\" }, " +
-            "      subtree " +
-            "      {" +
-            "        { base \"ou=system\" }, " +
-            "        { " +
-            "          base \"ou=ORGANIZATIONUNIT\"," +
-            "          minimum  1, " +
-            "          maximum   2 " +
-            "        } " +
-            "      } " +
-            "    }  , " +
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems" +
-            "        { " +
-            "          entry  , " +
-            "          attributeType { cn  , ou }  , " +
-            "          attributeValue {cn=y,sn=n,dc=l} , " +
-            "          rangeOfValues (cn=ErsinEr) " +
-            "        }  , " +
-            "        grantsAndDenials { grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}   ";
+                "  identificationTag \"id\"   , " +
+                "  precedence 10, " +
+                "  authenticationLevel none  , " +
+                "  itemOrUserFirst userFirst:  " +
+                "  { " +
+                "    userClasses " +
+                "    {  " +
+                "      parentOfEntry  , " +
+                "      name { \"cn=ersin,ou=people\" }, " +
+                "      subtree " +
+                "      {" +
+                "        { base \"ou=system\" }, " +
+                "        { " +
+                "          base \"ou=ORGANIZATIONUNIT\"," +
+                "          minimum  1, " +
+                "          maximum   2 " +
+                "        } " +
+                "      } " +
+                "    }  , " +
+                "    userPermissions " +
+                "    { " +
+                "      { " +
+                "        protectedItems" +
+                "        { " +
+                "          entry  , " +
+                "          attributeType { cn  , ou }  , " +
+                "          attributeValue {cn=y,sn=n,dc=l} , " +
+                "          rangeOfValues (cn=ErsinEr) " +
+                "        }  , " +
+                "        grantsAndDenials { grantBrowse } " +
+                "      } " +
+                "    } " +
+                "  } " +
+                "}   ";
 
         ACIItem item = parser.parse( spec );
         checkItemToString( spec, item );
@@ -776,7 +777,7 @@ public class ACIItemParserTest
     /**
      * Test case for DIRSTUDIO-440
      */
-    @Test 
+    @Test
     public void testPrecedenceOfUserFirst() throws Exception
     {
         String spec = "{ identificationTag \"test\", precedence 14, authenticationLevel simple, "
@@ -814,49 +815,49 @@ public class ACIItemParserTest
     /**
      * Test case for DIRSERVER-891
      */
-    @Test 
+    @Test
     public void testIncomplete()
     {
         String spec;
-        
+
         spec = "{ }";
         try
         {
             parser.parse( spec );
-            fail("Expected ParseException, ACIItem is incomplete'");
+            fail( "Expected ParseException, ACIItem is incomplete'" );
         }
         catch ( ParseException e )
         {
             // Expected
         }
-        
+
         spec = "{ identificationTag \"id2\" }";
         try
         {
             parser.parse( spec );
-            fail("Expected ParseException, ACIItem is incomplete'");
+            fail( "Expected ParseException, ACIItem is incomplete'" );
         }
         catch ( ParseException e )
         {
             // Expected
         }
-        
+
         spec = "{ identificationTag \"id2\", precedence 14 } ";
         try
         {
             parser.parse( spec );
-            fail("Expected ParseException, ACIItem is incomplete'");
+            fail( "Expected ParseException, ACIItem is incomplete'" );
         }
         catch ( ParseException e )
         {
             // Expected
         }
-        
+
         spec = "{ identificationTag \"id2\", precedence 14, authenticationLevel none } ";
         try
         {
             parser.parse( spec );
-            fail("Expected ParseException, ACIItem is incomplete'");
+            fail( "Expected ParseException, ACIItem is incomplete'" );
         }
         catch ( ParseException e )
         {

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java (original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java Tue Jan 24 17:27:00 2012
@@ -44,33 +44,34 @@ public class StandaloneLdapCodecServiceT
     public static void setupLdapApiService() throws Exception
     {
         // Load the extension points
-        System.setProperty( StandaloneLdapApiService.DEFAULT_CONTROLS_LIST, 
+        System.setProperty( StandaloneLdapApiService.DEFAULT_CONTROLS_LIST,
             "org.apache.directory.shared.ldap.codec.controls.cascade.CascadeFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.manageDsaIT.ManageDsaITFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.search.entryChange.EntryChangeFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesFactory" );
+                "org.apache.directory.shared.ldap.codec.controls.manageDsaIT.ManageDsaITFactory," +
+                "org.apache.directory.shared.ldap.codec.controls.search.entryChange.EntryChangeFactory," +
+                "org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsFactory," +
+                "org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory," +
+                "org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesFactory" );
 
-        System.setProperty( StandaloneLdapApiService.EXTRA_CONTROLS_LIST, 
+        System.setProperty( StandaloneLdapApiService.EXTRA_CONTROLS_LIST,
             "org.apache.directory.shared.ldap.extras.controls.ppolicy_impl.PasswordPolicyFactory," +
-            "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory," +
-            "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory," +
-            "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory," +
-            "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory" );
-        
-        System.setProperty( StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST, 
+                "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory," +
+                "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory," +
+                "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory," +
+                "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory" );
+
+        System.setProperty( StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST,
             "org.apache.directory.shared.ldap.extras.extended.ads_impl.cancel.CancelFactory," +
-            "org.apache.directory.shared.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory," +
-            "org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory," +
-            "org.apache.directory.shared.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory" );
+                "org.apache.directory.shared.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory," +
+                "org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory," +
+                "org.apache.directory.shared.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory" );
 
-        System.setProperty( StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST, 
+        System.setProperty( StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST,
             "org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory" );
-        
-        System.setProperty( StandaloneLdapApiService.EXTRA_EXTENDED_OPERATION_LIST, "" ); 
+
+        System.setProperty( StandaloneLdapApiService.EXTRA_EXTENDED_OPERATION_LIST, "" );
     }
 
+
     /**
      * Test method for {@link org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService#StandaloneLdapCodecService()}.
      */
@@ -78,7 +79,7 @@ public class StandaloneLdapCodecServiceT
     public void testLoadingExtras() throws Exception
     {
         LdapApiService codec = LdapApiServiceFactory.getSingleton();
-        
+
         assertTrue( codec.isControlRegistered( PasswordPolicy.OID ) );
 
         CodecControl<? extends Control> control = codec.newControl( PasswordPolicy.OID );
@@ -97,10 +98,10 @@ public class StandaloneLdapCodecServiceT
         StoredProcedureRequest req = new StoredProcedureRequestImpl();
         req.setLanguage( "Java" );
         req.setProcedure( Strings.getBytesUtf8( "bogusProc" ) );
-        
+
         assertNotNull( req );
         assertNotNull( codec );
-        
+
         StoredProcedureRequest decorator = ( StoredProcedureRequest ) codec.decorate( req );
         assertNotNull( decorator );
     }

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java (original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java Tue Jan 24 17:27:00 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.entry;
 
+
 import static org.junit.Assert.assertEquals;
 
 import java.io.ByteArrayInputStream;
@@ -40,6 +41,7 @@ import org.junit.runner.RunWith;
 import com.mycila.junit.concurrent.Concurrency;
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 
+
 /**
  * Test the Attribute Serialization
  * 
@@ -49,15 +51,19 @@ import com.mycila.junit.concurrent.Concu
 @Concurrency()
 public class SchemaAwareAttributeSerializationTest
 {
-    private static byte[] data1 = new byte[] {0x01, 0x02, 0x03, 0x04};
-    private static byte[] data2 = new byte[] {0x05, 0x06, 0x07, 0x08};
-    private static byte[] data3 = new byte[] {0x09, 0x0A, 0x0B, 0x0C};
-    
+    private static byte[] data1 = new byte[]
+        { 0x01, 0x02, 0x03, 0x04 };
+    private static byte[] data2 = new byte[]
+        { 0x05, 0x06, 0x07, 0x08 };
+    private static byte[] data3 = new byte[]
+        { 0x09, 0x0A, 0x0B, 0x0C };
+
     private static AttributeType cn = null;
     private static AttributeType userCertificate = null;
 
     private static SchemaManager schemaManager;
 
+
     /**
      * Initialize OIDs maps for normalization
      */
@@ -68,18 +74,19 @@ public class SchemaAwareAttributeSeriali
         cn = schemaManager.getAttributeType( "cn" );
         userCertificate = schemaManager.getAttributeType( "userCertificate" );
     }
-    
-    
+
+
     @Test
-    public void testEntryAttributeNoStringValueSerialization() throws IOException, ClassNotFoundException, LdapInvalidAttributeValueException
+    public void testEntryAttributeNoStringValueSerialization() throws IOException, ClassNotFoundException,
+        LdapInvalidAttributeValueException
     {
         Attribute attribute1 = new DefaultAttribute( cn );
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         attribute1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();
@@ -91,18 +98,19 @@ public class SchemaAwareAttributeSeriali
 
         assertEquals( attribute1, attribute2 );
     }
-    
-    
+
+
     @Test
-    public void testEntryAttributeOneStringValueSerialization() throws IOException, ClassNotFoundException, LdapInvalidAttributeValueException
+    public void testEntryAttributeOneStringValueSerialization() throws IOException, ClassNotFoundException,
+        LdapInvalidAttributeValueException
     {
         Attribute attribute1 = new DefaultAttribute( "CommonName", cn, "test" );
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         attribute1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();
@@ -115,18 +123,19 @@ public class SchemaAwareAttributeSeriali
         assertEquals( attribute1, attribute2 );
         assertEquals( "CommonName", attribute2.getUpId() );
     }
-    
-    
+
+
     @Test
-    public void testEntryAttributeManyStringValuesSerialization() throws IOException, ClassNotFoundException, LdapInvalidAttributeValueException
+    public void testEntryAttributeManyStringValuesSerialization() throws IOException, ClassNotFoundException,
+        LdapInvalidAttributeValueException
     {
         Attribute attribute1 = new DefaultAttribute( "CN", cn, "test1", "test2", "test3" );
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         attribute1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();
@@ -142,15 +151,16 @@ public class SchemaAwareAttributeSeriali
 
 
     @Test
-    public void testEntryAttributeNoBinaryValueSerialization() throws IOException, ClassNotFoundException, LdapInvalidAttributeValueException, LdapInvalidAttributeValueException
+    public void testEntryAttributeNoBinaryValueSerialization() throws IOException, ClassNotFoundException,
+        LdapInvalidAttributeValueException, LdapInvalidAttributeValueException
     {
         Attribute attribute1 = new DefaultAttribute( userCertificate );
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         attribute1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();
@@ -162,18 +172,19 @@ public class SchemaAwareAttributeSeriali
 
         assertEquals( attribute1, attribute2 );
     }
-    
-    
+
+
     @Test
-    public void testEntryAttributeOneBinaryValueSerialization() throws IOException, ClassNotFoundException, LdapInvalidAttributeValueException
+    public void testEntryAttributeOneBinaryValueSerialization() throws IOException, ClassNotFoundException,
+        LdapInvalidAttributeValueException
     {
         Attribute attribute1 = new DefaultAttribute( userCertificate, data1 );
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         attribute1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();
@@ -185,18 +196,19 @@ public class SchemaAwareAttributeSeriali
 
         assertEquals( attribute1, attribute2 );
     }
-    
-    
+
+
     @Test
-    public void testEntryAttributeManyBinaryValuesSerialization() throws IOException, ClassNotFoundException, LdapInvalidAttributeValueException
+    public void testEntryAttributeManyBinaryValuesSerialization() throws IOException, ClassNotFoundException,
+        LdapInvalidAttributeValueException
     {
         Attribute attribute1 = new DefaultAttribute( "UserCertificate", userCertificate, data1, data2, data3 );
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         attribute1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeTest.java (original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeTest.java Tue Jan 24 17:27:00 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.entry;
 
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -58,6 +59,7 @@ import org.junit.runner.RunWith;
 import com.mycila.junit.concurrent.Concurrency;
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 
+
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
 /**
@@ -71,7 +73,7 @@ public class SchemaAwareAttributeTest
     private static AttributeType atDC;
     private static AttributeType atSN;
     private static AttributeType atName;
-    
+
     // A SINGLE-VALUE attribute
     private static AttributeType atC;
 
@@ -80,7 +82,7 @@ public class SchemaAwareAttributeTest
 
     // A String attribute which allows null value
     private static AttributeType atEMail;
-    
+
     private static final Value<String> NULL_STRING_VALUE = new StringValue( ( String ) null );
     private static final Value<byte[]> NULL_BINARY_VALUE = new BinaryValue( ( byte[] ) null );
     private static final byte[] BYTES1 = new byte[]
@@ -104,6 +106,7 @@ public class SchemaAwareAttributeTest
 
     private static SchemaManager schemaManager;
 
+
     /**
      * Serialize a DefaultEntryAttribute
      */
@@ -196,7 +199,7 @@ public class SchemaAwareAttributeTest
         atName = schemaManager.lookupAttributeTypeRegistry( "name" );
     }
 
-    
+
     /**
      * Test method isValid( SyntaxChecker ) 
      */
@@ -204,16 +207,16 @@ public class SchemaAwareAttributeTest
     public void testIsValidSyntaxChecker() throws LdapException
     {
         Attribute attr = new DefaultAttribute( "test" );
-        
+
         attr.add( "test", "another test" );
-        
+
         assertTrue( attr.isValid( atCN ) );
-        
+
         attr.add( "test an invalid '\uFFFD' char" );
         assertFalse( attr.isValid( atCN ) );
     }
-    
-    
+
+
     @Test
     public void testAddOneValue() throws Exception
     {
@@ -613,7 +616,7 @@ public class SchemaAwareAttributeTest
     {
         Attribute attr1 = new DefaultAttribute( atDC );
 
-        int nbAdded = attr1.add( (String)null );
+        int nbAdded = attr1.add( ( String ) null );
         assertEquals( 1, nbAdded );
         assertTrue( attr1.isHumanReadable() );
         assertEquals( NULL_STRING_VALUE, attr1.get() );
@@ -1505,7 +1508,7 @@ public class SchemaAwareAttributeTest
         Attribute attr = new DefaultAttribute( atCN );
 
         assertTrue( attr.isInstanceOf( atCN ) );
-        assertTrue( attr.isInstanceOf( atName) );
+        assertTrue( attr.isInstanceOf( atName ) );
         assertFalse( attr.isInstanceOf( atSN ) );
     }
 
@@ -1596,7 +1599,7 @@ public class SchemaAwareAttributeTest
 
         // Now check wrong IDs
         attr = new DefaultAttribute( atCN );
-        
+
         try
         {
             attr.setUpId( "sn" );
@@ -1606,7 +1609,7 @@ public class SchemaAwareAttributeTest
         {
             // Expected
         }
-        
+
         assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
@@ -1620,7 +1623,7 @@ public class SchemaAwareAttributeTest
         {
             // Expected
         }
-    
+
         assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
@@ -1634,7 +1637,7 @@ public class SchemaAwareAttributeTest
         {
             // Expected
         }
-        
+
         assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
@@ -2096,7 +2099,7 @@ public class SchemaAwareAttributeTest
     public void testSerializeAttributeBinaryValue() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultAttribute dsa = new DefaultAttribute( atPwd );
-        byte[] password = Strings.getBytesUtf8("secret");
+        byte[] password = Strings.getBytesUtf8( "secret" );
         dsa.add( password );
 
         DefaultAttribute dsaSer = deserializeValue( serializeValue( dsa ), atPwd );

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareEntrySerializationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareEntrySerializationTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareEntrySerializationTest.java (original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareEntrySerializationTest.java Tue Jan 24 17:27:00 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.entry;
 
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -40,6 +41,7 @@ import org.junit.runner.RunWith;
 import com.mycila.junit.concurrent.Concurrency;
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 
+
 /**
  * Test the Entry Serialization
  * 
@@ -51,6 +53,7 @@ public class SchemaAwareEntrySerializati
 {
     private static SchemaManager schemaManager;
 
+
     /**
      * Initialize OIDs maps for normalization
      */
@@ -59,24 +62,24 @@ public class SchemaAwareEntrySerializati
     {
         schemaManager = new DefaultSchemaManager();
     }
-    
-    
+
+
     @Test
     public void testEntryFullSerialization() throws IOException, LdapException, ClassNotFoundException
     {
-        Entry entry1 = new DefaultEntry( 
+        Entry entry1 = new DefaultEntry(
             schemaManager,
-            "dc=example, dc=com", 
+            "dc=example, dc=com",
             "ObjectClass: top",
             "ObjectClass: domain",
             "dc: example",
             "l: test" );
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         entry1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();
@@ -84,28 +87,28 @@ public class SchemaAwareEntrySerializati
 
         Entry entry2 = new DefaultEntry( schemaManager );
         entry2.readExternal( in );
-        
+
         assertEquals( entry1, entry2 );
         assertTrue( entry2.contains( "2.5.4.0", "top", "domain" ) );
     }
-    
-    
+
+
     @Test
     public void testEntryNoDnSerialization() throws IOException, LdapException, ClassNotFoundException
     {
-        Entry entry1 = new DefaultEntry( 
+        Entry entry1 = new DefaultEntry(
             schemaManager,
-            "", 
+            "",
             "ObjectClass: top",
             "ObjectClass: domain",
             "dc: example",
             "l: test" );
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         entry1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();
@@ -123,13 +126,13 @@ public class SchemaAwareEntrySerializati
     @Test
     public void testEntryNoAttributesSerialization() throws IOException, LdapException, ClassNotFoundException
     {
-        Entry entry1 = new DefaultEntry( schemaManager, "dc=example, dc=com" ); 
-        
+        Entry entry1 = new DefaultEntry( schemaManager, "dc=example, dc=com" );
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         entry1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();
@@ -146,13 +149,13 @@ public class SchemaAwareEntrySerializati
     @Test
     public void testEntryNoAttributesNoDnSerialization() throws IOException, LdapException, ClassNotFoundException
     {
-        Entry entry1 = new DefaultEntry( schemaManager, "" ); 
-        
+        Entry entry1 = new DefaultEntry( schemaManager, "" );
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         entry1.writeExternal( out );
-        
+
         ObjectInputStream in = null;
 
         byte[] data = baos.toByteArray();



Mime
View raw message