directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1068929 [3/4] - in /directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec: ./ abandon/ add/ bind/ compare/ del/ extended/ intermediate/ modify/ modifyDn/ search/ search/controls/
Date Wed, 09 Feb 2011 15:10:53 GMT
Modified: directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java?rev=1068929&r1=1068928&r2=1068929&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java Wed Feb  9 15:10:51 2011
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.codec.search;
 
@@ -32,16 +32,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
-import org.apache.directory.shared.ldap.codec.LdapEncoder;
+import org.apache.directory.shared.ldap.codec.AbstractCodecServiceTest;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.api.DefaultLdapCodecService;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.ResponseCarryingException;
 import org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.SearchRequestDecorator;
@@ -63,7 +59,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.message.SearchResultDoneImpl;
-import org.apache.directory.shared.ldap.model.message.controls.Subentries;
 import org.apache.directory.shared.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.model.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.util.Strings;
@@ -71,22 +66,19 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * A test case for SearchRequest messages
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
-public class SearchRequestTest
+public class SearchRequestTest extends AbstractCodecServiceTest
 {
-    /** The encoder instance */
-    LdapEncoder encoder = new LdapEncoder();
-
-    /** The codec service */
-    LdapCodecService codec = new DefaultLdapCodecService();
-
     /** An oid normalizer map */
     static Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
@@ -152,7 +144,7 @@ public class SearchRequestTest
                 // derefFindingBaseObj (2),
                 // derefAlways (3) },
                 0x02, 0x02, 0x03, ( byte ) 0xE8, // sizeLimit INTEGER (0 .. maxInt), (1000)
-                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF, // typesOnly  BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x3C, // Filter ::= CHOICE {
@@ -187,7 +179,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -315,7 +307,7 @@ public class SearchRequestTest
                 //         derefFindingBaseObj (2),
                 //         derefAlways (3) },
                 0x02, 0x02, 0x03, ( byte ) 0xE8, //     sizeLimit INTEGER (0 .. maxInt), (1000)
-                0x02, 0x02, 0x03, ( byte ) 0xE8, //     timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x02, 0x03, ( byte ) 0xE8, //     timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF, //     typesOnly BOOLEAN, (TRUE)
                 //     filter Filter,
                 ( byte ) 0xA0, 0x3C, // Filter ::= CHOICE {
@@ -325,15 +317,15 @@ public class SearchRequestTest
                 // Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x0B, // attributeDesc AttributeDescription (LDAPString),
-                'o', 'b', 'j', 'e', 'c', 't', 'c', 'l', 'a', 's', 's', 0x04, 0x03, // attributeDesc AttributeDescription (LDAPString), 
+                'o', 'b', 'j', 'e', 'c', 't', 'c', 'l', 'a', 's', 's', 0x04, 0x03, // attributeDesc AttributeDescription (LDAPString),
                 't', 'o', 'p', ( byte ) 0xA6, 0x0E, // lessOrEqual [3] Assertion,
                 0x04, 0x02, // Assertion ::= SEQUENCE {
                 'o', 'u', // attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x08, // assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x08, // assertionValue AssertionValue (OCTET STRING) }
                 'c', 'o', 'n', 't', 'a', 'c', 't', 's', ( byte ) 0xA2, 0x14, // not [2] Filter,
                 ( byte ) 0xA5, 0x12, // greaterOrEqual [5] Assertion,
                 // Assertion ::= SEQUENCE {
-                0x04, 0x0B, // attributeDesc AttributeDescription (LDAPString), 
+                0x04, 0x0B, // attributeDesc AttributeDescription (LDAPString),
                 'o', 'b', 'j', 'e', 'c', 't', 'c', 'l', 'a', 's', 's', 0x04, 0x03, 't', 't', 't', // assertionValue AssertionValue (OCTET STRING) }
                 // attributes AttributeDescriptionList }
                 0x30, 0x15, // AttributeDescriptionList ::= SEQUENCE OF
@@ -347,7 +339,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -515,7 +507,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -659,7 +651,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -765,7 +757,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -853,7 +845,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -943,7 +935,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -1056,19 +1048,19 @@ public class SearchRequestTest
                   ( byte ) 0xa0, 0x45, // controls
                     0x30, 0x28,
                       0x04, 0x16, // control
-                        '1', '.', '2', '.', '8', '4', '0', '.', 
-                        '1', '1', '3', '5', '5', '6', '.', '1', 
-                        '.', '4', '.', '3', '1', '9', 
+                        '1', '.', '2', '.', '8', '4', '0', '.',
+                        '1', '1', '3', '5', '5', '6', '.', '1',
+                        '.', '4', '.', '3', '1', '9',
                       0x01, 0x01, ( byte ) 0xff, // criticality: false
-                      0x04, 0x0b, 
-                        0x30, 0x09, 
-                          0x02, 0x01, 0x02, 
+                      0x04, 0x0b,
+                        0x30, 0x09,
+                          0x02, 0x01, 0x02,
                           0x04, 0x04, 0x47, 0x00, 0x00, 0x00, // value: pageSize=2
-                    0x30, 0x19, 
+                    0x30, 0x19,
                       0x04, 0x17, // control
-                        '2', '.', '1', '6', '.', '8', '4', '0', 
-                        '.', '1', '.', '1', '1', '3', '7', '3', 
-                        '0', '.', '3', '.', '4', '.', '2', 
+                        '2', '.', '1', '6', '.', '8', '4', '0',
+                        '.', '1', '.', '1', '1', '3', '7', '3',
+                        '0', '.', '3', '.', '4', '.', '2',
                         };
 
         byte[] asn1BERJava6 = new byte[]
@@ -1086,20 +1078,20 @@ public class SearchRequestTest
                    'o', 'b', 'j', 'e', 'c', 't', 'C', 'l', 'a', 's', 's',
                  0x30, 0x00, // Attributes = '*'
                  ( byte ) 0xa0, 0x45, // controls
-                   0x30, 0x19, 
+                   0x30, 0x19,
                      0x04, 0x17, // control
-                       '2', '.', '1', '6', '.', '8', '4', '0', 
-                       '.', '1', '.', '1', '1', '3', '7', '3', 
-                       '0', '.', '3', '.', '4', '.', '2', 
+                       '2', '.', '1', '6', '.', '8', '4', '0',
+                       '.', '1', '.', '1', '1', '3', '7', '3',
+                       '0', '.', '3', '.', '4', '.', '2',
                    0x30, 0x28,
                      0x04, 0x16, // control
-                       '1', '.', '2', '.', '8', '4', '0', '.', 
-                       '1', '1', '3', '5', '5', '6', '.', '1', 
-                       '.', '4', '.', '3', '1', '9', 
+                       '1', '.', '2', '.', '8', '4', '0', '.',
+                       '1', '1', '3', '5', '5', '6', '.', '1',
+                       '.', '4', '.', '3', '1', '9',
                      0x01, 0x01, ( byte ) 0xff, // criticality: false
-                     0x04, 0x0b, 
-                       0x30, 0x09, 
-                         0x02, 0x01, 0x02, 
+                     0x04, 0x0b,
+                       0x30, 0x09,
+                         0x02, 0x01, 0x02,
                          0x04, 0x04, 0x47, 0x00, 0x00, 0x00, // value: pageSize=2
                        };
 
@@ -1116,7 +1108,7 @@ public class SearchRequestTest
         streamJava5.put( asn1BERJava5 );
         String decodedPduJava5 = Strings.dumpBytes(streamJava5.array());
 
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -1168,7 +1160,7 @@ public class SearchRequestTest
             assertEquals( 0x81, bb.limit() );
 
             String encodedPdu = Strings.dumpBytes(bb.array());
-            
+
             assertTrue( decodedPduJava5.equals( encodedPdu ) || decodedPduJava6.equals( encodedPdu ) );
         }
         catch ( EncoderException ee )
@@ -1295,7 +1287,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -1336,7 +1328,7 @@ public class SearchRequestTest
         // (& (| (obectclass=top) (...
         List<ExprNode> orNodes = orFilter.getChildren();
         assertEquals( 2, orNodes.size() );
-        
+
         EqualityNode<?> equalityNode = ( EqualityNode<?> ) orNodes.get( 0 );
         assertNotNull( equalityNode );
 
@@ -1414,7 +1406,7 @@ public class SearchRequestTest
         String decodedPdu = Strings.dumpBytes(stream.array());
         stream.flip();
 
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -1440,7 +1432,7 @@ public class SearchRequestTest
         assertEquals( subEntryControlOID, subEntryControl.getOid() );
         assertTrue( subEntryControl.isCritical() );
         assertTrue( subEntryControl instanceof SubentriesDecorator );
-        assertTrue( ( ( Subentries ) ( ( SubentriesDecorator ) subEntryControl ).getDecorated() ).isVisible() );
+        assertTrue( ( ( ( SubentriesDecorator ) subEntryControl ).getDecorated() ).isVisible() );
 
         assertEquals( "dc=my-domain,dc=com", searchRequest.getBase().toString() );
         assertEquals( SearchScope.SUBTREE, searchRequest.getScope() );
@@ -1491,7 +1483,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -1526,7 +1518,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -1571,7 +1563,7 @@ public class SearchRequestTest
                 // derefFindingBaseObj (2),
                 // derefAlways (3) },
                 0x02, 0x02, 0x03, ( byte ) 0xE8, // sizeLimit INTEGER (0 .. maxInt), (1000)
-                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF, // typesOnly  BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x3C, // Filter ::= CHOICE {
@@ -1606,7 +1598,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -1647,7 +1639,7 @@ public class SearchRequestTest
         // (& (| (obectclass=top) (...
         List<ExprNode> orNodes = orFilter.getChildren();
         assertEquals( 2, orNodes.size() );
-        
+
         EqualityNode<?> equalityNode = ( EqualityNode<?> ) orNodes.get( 0 );
         assertNotNull( equalityNode );
 
@@ -1733,7 +1725,7 @@ public class SearchRequestTest
                 // derefFindingBaseObj (2),
                 // derefAlways (3) },
                 0x02, 0x02, 0x03, ( byte ) 0xE8, // sizeLimit INTEGER (0 .. maxInt), (1000)
-                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF, // typesOnly  BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x3C, // Filter ::= CHOICE {
@@ -1767,7 +1759,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -1809,7 +1801,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -1859,7 +1851,7 @@ public class SearchRequestTest
                 // derefFindingBaseObj (2),
                 // derefAlways (3) },
                 0x02, 0x02, 0x03, ( byte ) 0xE8, // sizeLimit INTEGER (0 .. maxInt), (1000)
-                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF, // typesOnly  BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x3C, // Filter ::= CHOICE {
@@ -1893,7 +1885,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -1931,7 +1923,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -1981,7 +1973,7 @@ public class SearchRequestTest
                 // derefFindingBaseObj (2),
                 // derefAlways (3) },
                 0x02, 0x02, 0x03, ( byte ) 0xE8, // sizeLimit INTEGER (0 .. maxInt), (1000)
-                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF, // typesOnly  BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x3C, // Filter ::= CHOICE {
@@ -2015,7 +2007,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -2053,7 +2045,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2103,7 +2095,7 @@ public class SearchRequestTest
                 // derefFindingBaseObj (2),
                 // derefAlways (3) },
                 0x02, 0x01, ( byte ) 0xFF, // sizeLimit INTEGER (0 .. maxInt), (1000)
-                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x02, 0x03, ( byte ) 0xE8, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF, // typesOnly  BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x3C, // Filter ::= CHOICE {
@@ -2137,7 +2129,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -2178,7 +2170,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2228,7 +2220,7 @@ public class SearchRequestTest
                 // derefFindingBaseObj (2),
                 // derefAlways (3) },
                 0x02, 0x02, 0x03, ( byte ) 0xE8, // sizeLimit INTEGER (0 .. maxInt), (1000)
-                0x02, 0x01, ( byte ) 0xFF, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, ( byte ) 0xFF, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF, // typesOnly  BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x3C, // Filter ::= CHOICE {
@@ -2262,7 +2254,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -2303,7 +2295,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2345,7 +2337,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2387,7 +2379,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2429,7 +2421,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2471,7 +2463,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2513,7 +2505,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2555,7 +2547,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2598,7 +2590,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2647,7 +2639,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2738,7 +2730,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2829,7 +2821,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2898,7 +2890,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2945,7 +2937,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -2992,7 +2984,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -3040,7 +3032,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -3081,7 +3073,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         // Decode a SearchRequest message
@@ -3107,7 +3099,7 @@ public class SearchRequestTest
         assertEquals( 0, searchRequest.getTimeLimit() );
         assertEquals( false, searchRequest.getTypesOnly() );
 
-        // And 
+        // And
         ExprNode filter = searchRequest.getFilter();
 
         AndNode andNode = ( AndNode ) filter;
@@ -3179,14 +3171,14 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA3, 0x06, // Filter ::= CHOICE {
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 // attributes AttributeDescriptionList }
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
@@ -3195,7 +3187,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -3280,7 +3272,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x08, // Filter ::= CHOICE {
@@ -3288,7 +3280,7 @@ public class SearchRequestTest
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 // attributes AttributeDescriptionList }
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
@@ -3297,7 +3289,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -3390,7 +3382,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x10, // Filter ::= CHOICE {
@@ -3398,12 +3390,12 @@ public class SearchRequestTest
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA3, 0x06,
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'c', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) }
                 // attributes AttributeDescriptionList }
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
@@ -3412,7 +3404,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -3512,7 +3504,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x0A, // Filter ::= CHOICE { and             [0] SET OF Filter,
@@ -3520,7 +3512,7 @@ public class SearchRequestTest
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
@@ -3528,7 +3520,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -3628,7 +3620,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x12, // Filter ::= CHOICE { and             [0] SET OF Filter,
@@ -3637,12 +3629,12 @@ public class SearchRequestTest
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA3, 0x06,
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'c', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) }
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
@@ -3650,7 +3642,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -3757,7 +3749,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x12, // Filter ::= CHOICE { and             [0] SET OF Filter,
@@ -3765,12 +3757,12 @@ public class SearchRequestTest
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA3, 0x06, //      equalityMatch [3] Assertion,
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'c', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) }
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
@@ -3778,7 +3770,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -3885,7 +3877,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x1A, // Filter ::= CHOICE { and             [0] SET OF Filter,
@@ -3893,16 +3885,16 @@ public class SearchRequestTest
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'c', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA3, 0x06, //      equalityMatch [3] Assertion,
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'e', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'f', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'f', //      assertionValue AssertionValue (OCTET STRING) }
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
@@ -3910,7 +3902,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -4025,24 +4017,24 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x1A, // Filter ::= CHOICE { and             [0] SET OF Filter,
                 ( byte ) 0xA3, 0x06, //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA1, 0x10, // Filter ::= CHOICE { or             [1] SET OF Filter,
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'c', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'e', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'f', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'f', //      assertionValue AssertionValue (OCTET STRING) }
                 0x30, 0x00, // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
@@ -4050,7 +4042,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -4164,7 +4156,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x14, // Filter ::= CHOICE { and             [0] SET OF Filter,
@@ -4172,13 +4164,13 @@ public class SearchRequestTest
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA0, 0x08, // Filter ::= CHOICE { and             [0] SET OF Filter,
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'c', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) }
                 0x30, 0x00 // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
@@ -4186,7 +4178,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -4300,7 +4292,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x1C, // Filter ::= CHOICE { and             [0] SET OF Filter,
@@ -4308,17 +4300,17 @@ public class SearchRequestTest
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'a', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'b', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'c', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'd', //      assertionValue AssertionValue (OCTET STRING) }
                 ( byte ) 0xA0, 0x08, // Filter ::= CHOICE { and             [0] SET OF Filter,
                 ( byte ) 0xA3, 0x06,//      equalityMatch [3] Assertion,
                 //      equalityMatch [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'e', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'f', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'f', //      assertionValue AssertionValue (OCTET STRING) }
                 0x30, 0x00 // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
@@ -4326,7 +4318,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -4447,7 +4439,7 @@ public class SearchRequestTest
                 //      derefFindingBaseObj (2),
                 //      derefAlways (3) },
                 0x02, 0x01, 0x00, // sizeLimit INTEGER (0 .. maxInt), (0)
-                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000) 
+                0x02, 0x01, 0x00, // timeLimit INTEGER (0 .. maxInt), (1000)
                 0x01, 0x01, ( byte ) 0xFF,// typesOnly BOOLEAN, (TRUE)
                 // filter Filter,
                 ( byte ) 0xA0, 0x1C, // Filter ::= CHOICE { and             [0] SET OF Filter,
@@ -4460,7 +4452,7 @@ public class SearchRequestTest
                 ( byte ) 0xA5, 0x06,//      greaterOrEqual [3] Assertion,
                 // Assertion ::= SEQUENCE {
                 0x04, 0x01, 'e', //      attributeDesc AttributeDescription (LDAPString),
-                0x04, 0x01, 'f', //      assertionValue AssertionValue (OCTET STRING) } 
+                0x04, 0x01, 'f', //      assertionValue AssertionValue (OCTET STRING) }
                 0x30, 0x00 // AttributeDescriptionList ::= SEQUENCE OF AttributeDescription
             } );
 
@@ -4468,7 +4460,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -4576,7 +4568,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -4641,7 +4633,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try
@@ -4752,7 +4744,7 @@ public class SearchRequestTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchRequestDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchRequestDecorator>( codec );
 
         try

Modified: directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java?rev=1068929&r1=1068928&r2=1068929&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java Wed Feb  9 15:10:51 2011
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.codec.search;
 
@@ -27,16 +27,12 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.ldap.codec.LdapEncoder;
+import org.apache.directory.shared.ldap.codec.AbstractCodecServiceTest;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
-import org.apache.directory.shared.ldap.codec.api.DefaultLdapCodecService;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.decorators.SearchResultDoneDecorator;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
@@ -45,23 +41,19 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the SearchResultDone codec
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
-public class SearchResultDoneTest
+public class SearchResultDoneTest extends AbstractCodecServiceTest
 {
-    /** The encoder instance */
-    LdapEncoder encoder = new LdapEncoder();
-
-    /** The codec service */
-    LdapCodecService codec = new DefaultLdapCodecService();
-
-
     /**
      * Test the decoding of a SearchResultDone
      */
@@ -91,7 +83,7 @@ public class SearchResultDoneTest
         stream.flip();
 
         // Allocate a SearchResultDone Container
-        LdapMessageContainer<SearchResultDoneDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultDoneDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultDoneDecorator>( codec );
 
         try
@@ -172,7 +164,7 @@ public class SearchResultDoneTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultDoneDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultDoneDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultDoneDecorator>( codec );
 
         try
@@ -199,7 +191,7 @@ public class SearchResultDoneTest
 
         CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> )controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
+        assertEquals( "", Strings.dumpBytes(control.getValue()) );
 
         // Check the encoding
         try
@@ -240,7 +232,7 @@ public class SearchResultDoneTest
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<SearchResultDoneDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultDoneDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultDoneDecorator>( codec );
 
         // Decode a SearchResultDone message

Modified: directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java?rev=1068929&r1=1068928&r2=1068929&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java Wed Feb  9 15:10:51 2011
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.codec.search;
 
@@ -29,16 +29,12 @@ import java.util.Map;
 
 import javax.naming.NamingException;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.ldap.codec.LdapEncoder;
+import org.apache.directory.shared.ldap.codec.AbstractCodecServiceTest;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
-import org.apache.directory.shared.ldap.codec.api.DefaultLdapCodecService;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.decorators.SearchResultEntryDecorator;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
@@ -48,23 +44,19 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the SearchResultEntry codec
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
-public class SearchResultEntryTest
+public class SearchResultEntryTest extends AbstractCodecServiceTest
 {
-    /** The encoder instance */
-    LdapEncoder encoder = new LdapEncoder();
-
-    /** The codec service */
-    LdapCodecService codec = new DefaultLdapCodecService();
-
-
     /**
      * Test the decoding of a SearchResultEntry
      */
@@ -106,7 +98,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -207,7 +199,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -318,7 +310,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -405,7 +397,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -446,7 +438,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -492,7 +484,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -540,7 +532,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -612,7 +604,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -665,7 +657,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -716,7 +708,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -767,7 +759,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -819,7 +811,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -906,7 +898,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -996,7 +988,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -1034,7 +1026,7 @@ public class SearchResultEntryTest
 
         CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> )controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
+        assertEquals( "", Strings.dumpBytes(control.getValue()) );
 
         // Check the encoding
         try
@@ -1093,7 +1085,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -1187,7 +1179,7 @@ public class SearchResultEntryTest
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer = 
+        LdapMessageContainer<SearchResultEntryDecorator> ldapMessageContainer =
             new LdapMessageContainer<SearchResultEntryDecorator>( codec );
 
         try
@@ -1225,7 +1217,7 @@ public class SearchResultEntryTest
 
         CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> )controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
+        assertEquals( "", Strings.dumpBytes(control.getValue()) );
 
         // Check the encoding
         try

Modified: directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java?rev=1068929&r1=1068928&r2=1068929&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java Wed Feb  9 15:10:51 2011
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.codec.search;
 
@@ -30,16 +30,12 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.ldap.codec.LdapEncoder;
+import org.apache.directory.shared.ldap.codec.AbstractCodecServiceTest;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
-import org.apache.directory.shared.ldap.codec.api.DefaultLdapCodecService;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.decorators.SearchResultReferenceDecorator;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.Referral;
@@ -48,23 +44,19 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the SearchResultReference codec
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
-public class SearchResultReferenceTest
+public class SearchResultReferenceTest extends AbstractCodecServiceTest
 {
-    /** The encoder instance */
-    LdapEncoder encoder = new LdapEncoder();
-
-    /** The codec service */
-    LdapCodecService codec = new DefaultLdapCodecService();
-
-
     /**
      * Test the decoding of a SearchResultReference
      */
@@ -298,7 +290,7 @@ public class SearchResultReferenceTest
 
         CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> )controls.get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
+        assertEquals( "", Strings.dumpBytes(control.getValue()) );
 
         // Check the encoding
         try

Modified: directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java?rev=1068929&r1=1068928&r2=1068929&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java Wed Feb  9 15:10:51 2011
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.codec.search.controls;
 
@@ -25,11 +25,8 @@ import static org.junit.Assert.assertNul
 
 import java.nio.ByteBuffer;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.ldap.codec.api.DefaultLdapCodecService;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
+import org.apache.directory.shared.ldap.codec.AbstractCodecServiceTest;
 import org.apache.directory.shared.ldap.codec.controls.search.entryChange.EntryChangeDecorator;
 import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
 import org.apache.directory.shared.ldap.model.message.controls.EntryChange;
@@ -38,18 +35,19 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the EntryChangeControlTest codec
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
-public class EntryChangeControlTest
+public class EntryChangeControlTest extends AbstractCodecServiceTest
 {
-    private LdapCodecService codec = new DefaultLdapCodecService();
-
     /**
      * Test the decoding of a EntryChangeControl
      */
@@ -58,7 +56,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0D );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x0B,                     // EntryChangeNotification ::= SEQUENCE {
               0x0A, 0x01, 0x08,             //     changeType ENUMERATED {
                                             //         modDN (8)
@@ -69,7 +67,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
-        
+
         EntryChange entryChange = (EntryChange)decorator.decode( bb.array() );
 
         assertEquals( ChangeType.MODDN, entryChange.getChangeType() );
@@ -86,7 +84,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x13 );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x11,                     // EntryChangeNotification ::= SEQUENCE {
               0x0A, 0x01, 0x08,             //     changeType ENUMERATED {
                                             //         modDN (8)
@@ -98,7 +96,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
-        
+
         EntryChange entryChange = (EntryChange)decorator.decode( bb.array() );
 
         assertEquals( ChangeType.MODDN, entryChange.getChangeType() );
@@ -115,7 +113,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x06,             // EntryChangeNotification ::= SEQUENCE {
               0x0A, 0x01, 0x01,     //     changeType ENUMERATED {
                                     //         Add (1)
@@ -126,7 +124,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
-        
+
         EntryChange entryChange = (EntryChange)decorator.decode( bb.array() );
 
         assertEquals( ChangeType.ADD, entryChange.getChangeType() );
@@ -144,7 +142,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0D );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x0B,                     // EntryChangeNotification ::= SEQUENCE {
               0x0A, 0x01, 0x01,             //     changeType ENUMERATED {
                                             //         ADD (1)
@@ -157,7 +155,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
 
@@ -170,7 +168,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x03,                 // EntryChangeNotification ::= SEQUENCE {
               0x0A, 0x01, 0x01,         //     changeType ENUMERATED {
                                         //         ADD (1)
@@ -180,7 +178,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
-        
+
         EntryChange entryChange = (EntryChange)decorator.decode( bb.array() );
 
         assertEquals( ChangeType.ADD, entryChange.getChangeType() );
@@ -198,7 +196,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x03,                 // EntryChangeNotification ::= SEQUENCE {
               0x0A, 0x01, 0x03,         //     changeType ENUMERATED {
                                         //         BAD Change Type
@@ -208,7 +206,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
 
@@ -221,7 +219,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x1C );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x1A,                     // EntryChangeNotification ::= SEQUENCE {
               0x0A, 0x01, 0x08,             //     changeType ENUMERATED {
                                             //         modDN (8)
@@ -234,7 +232,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
 
@@ -247,7 +245,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0D );
         bb.put( new byte[]
-            { 
+            {
                 0x30, 0x0B,                        // EntryChangeNotification ::= SEQUENCE {
                   0x0A, 0x01, 0x08,                //     changeType ENUMERATED {
                                                    //         modDN (8)
@@ -261,7 +259,7 @@ public class EntryChangeControlTest
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
 
-        EntryChange entryChange = (EntryChange) decorator.getDecorated();
+        EntryChange entryChange = decorator.getDecorated();
         entryChange.setChangeType( ChangeType.MODDN );
         entryChange.setChangeNumber( 16 );
         entryChange.setPreviousDn( new Dn( "a=b" ) );
@@ -279,7 +277,7 @@ public class EntryChangeControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x13 );
         bb.put( new byte[]
-            { 
+            {
                 0x30, 0x11,                        // EntryChangeNotification ::= SEQUENCE {
                   0x0A, 0x01, 0x08,                //     changeType ENUMERATED {
                                                    //         modDN (8)
@@ -293,8 +291,8 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
-        
-        EntryChange entryChange = (EntryChange) decorator.getDecorated();
+
+        EntryChange entryChange = decorator.getDecorated();
 
         entryChange.setChangeType( ChangeType.MODDN );
         entryChange.setChangeNumber( 5124095576030430L );

Modified: directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java?rev=1068929&r1=1068928&r2=1068929&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java Wed Feb  9 15:10:51 2011
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.codec.search.controls;
 
@@ -25,11 +25,8 @@ import static org.junit.Assert.assertTru
 
 import java.nio.ByteBuffer;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.ldap.codec.api.DefaultLdapCodecService;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
+import org.apache.directory.shared.ldap.codec.AbstractCodecServiceTest;
 import org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchDecorator;
 import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
 import org.apache.directory.shared.ldap.model.message.controls.PersistentSearch;
@@ -37,18 +34,19 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the PSearchControlTest codec
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
-public class PSearchControlTest
+public class PSearchControlTest extends AbstractCodecServiceTest
 {
-    private LdapCodecService codec = new DefaultLdapCodecService();
-
     /**
      * Test encoding of a PSearchControl.
      * @throws Exception on error
@@ -58,7 +56,7 @@ public class PSearchControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0B );
         bb.put( new byte[]
-            { 
+            {
                 0x30, 0x09,           // PersistentSearch ::= SEQUENCE {
                   0x02, 0x01, 0x01,   // changeTypes INTEGER,
                   0x01, 0x01, 0x00,   // changesOnly BOOLEAN,
@@ -69,7 +67,7 @@ public class PSearchControlTest
         bb.flip();
 
         PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
-        PersistentSearch ctrl = ( PersistentSearch ) decorator.getDecorated();
+        PersistentSearch ctrl = decorator.getDecorated();
         ctrl.setChangesOnly( false );
         ctrl.setReturnECs( false );
         ctrl.setChangeTypes( 1 );
@@ -86,7 +84,7 @@ public class PSearchControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x09,         // PersistentSearch ::= SEQUENCE {
               0x02, 0x01, 0x09, // changeTypes INTEGER,
               0x01, 0x01, 0x00, // changesOnly BOOLEAN,
@@ -105,7 +103,7 @@ public class PSearchControlTest
         assertEquals( false, ctrl.isReturnECs() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl with a changes types which
      * value is 0
@@ -115,7 +113,7 @@ public class PSearchControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x09,         // PersistentSearch ::= SEQUENCE {
               0x02, 0x01, 0x00, // changeTypes INTEGER,
               0x01, 0x01, 0x00, // changesOnly BOOLEAN,
@@ -137,7 +135,7 @@ public class PSearchControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x09,         // PersistentSearch ::= SEQUENCE {
               0x02, 0x01, 0x22, // changeTypes INTEGER,
               0x01, 0x01, 0x00, // changesOnly BOOLEAN,
@@ -150,7 +148,7 @@ public class PSearchControlTest
         decorator.decode( bb.array() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl with a null sequence
      */
@@ -159,7 +157,7 @@ public class PSearchControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x00,         // PersistentSearch ::= SEQUENCE {
             } );
         bb.flip();
@@ -169,7 +167,7 @@ public class PSearchControlTest
         decorator.decode( bb.array() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl without changeTypes
      */
@@ -178,7 +176,7 @@ public class PSearchControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x06,         // PersistentSearch ::= SEQUENCE {
               0x01, 0x01, 0x00, // changesOnly BOOLEAN,
               0x01, 0x01, 0x00  // returnECs BOOLEAN
@@ -190,7 +188,7 @@ public class PSearchControlTest
         decorator.decode( bb.array() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl without changeOnly
      */
@@ -199,7 +197,7 @@ public class PSearchControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x06,         // PersistentSearch ::= SEQUENCE {
               0x02, 0x01, 0x01, // changeTypes INTEGER,
               0x01, 0x01, 0x00  // returnECs BOOLEAN
@@ -211,7 +209,7 @@ public class PSearchControlTest
         decorator.decode( bb.array() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl without returnECs
      */
@@ -220,7 +218,7 @@ public class PSearchControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
+            {
             0x30, 0x06,         // PersistentSearch ::= SEQUENCE {
               0x02, 0x01, 0x01, // changeTypes INTEGER,
               0x01, 0x01, 0x00, // changesOnly BOOLEAN,



Mime
View raw message