directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235364 [13/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/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java Tue Jan 24 17:27:00 2012
@@ -69,21 +69,28 @@ public class BindResponseTest extends Ab
 
         stream.put( new byte[]
             { 0x30, 0x0C, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x61, 0x07, // CHOICE { ..., bindResponse BindResponse, ...
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x61,
+                0x07, // CHOICE { ..., bindResponse BindResponse, ...
                 // BindResponse ::= APPLICATION[1] SEQUENCE {
                 // COMPONENTS OF LDAPResult,
-                0x0A, 0x01, 0x00, // LDAPResult ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x00, // LDAPResult ::= SEQUENCE {
                 // resultCode ENUMERATED {
                 // success (0), ...
                 // },
-                0x04, 0x00, // matchedDN LDAPDN,
-                0x04, 0x00 // errorMessage LDAPString,
+                0x04,
+                0x00, // matchedDN LDAPDN,
+                0x04,
+                0x00 // errorMessage LDAPString,
             // referral [3] Referral OPTIONAL }
             // serverSaslCreds [7] OCTET STRING OPTIONAL }
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -116,7 +123,7 @@ public class BindResponseTest extends Ab
             // Check the length
             assertEquals( 0x0E, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -139,32 +146,74 @@ public class BindResponseTest extends Ab
         ByteBuffer stream = ByteBuffer.allocate( 0x3C );
 
         stream.put( new byte[]
-            { 0x30, 0x3A,                               // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01,                       // messageID MessageID
-                0x61, 0x07,                             // CHOICE { ..., bindResponse BindResponse, ...
-                                                        // BindResponse ::= APPLICATION[1] SEQUENCE {
-                                                        // COMPONENTS OF LDAPResult,
-                  0x0A,  0x01, 0x00,                    // LDAPResult ::= SEQUENCE {
-                                                        // resultCode ENUMERATED {
-                                                        // success (0), ...
-                                                        // },
-                  0x04, 0x00,                           // matchedDN LDAPDN,
-                  0x04, 0x00,                           // errorMessage LDAPString,
-                                                        // referral [3] Referral OPTIONAL }
-                                                        // serverSaslCreds [7] OCTET STRING OPTIONAL }
-                ( byte ) 0xa0, 0x2C,                    // controls
-                  0x30, 0x2A,                           // The PagedSearchControl
-                    0x04, 0x16,                         // Oid : 1.2.840.113556.1.4.319
-                      0x31, 0x2e, 0x32, 0x2e, 0x38, 0x34, 0x30, 0x2e, 
-                      0x31, 0x31, 0x33, 0x35, 0x35, 0x36, 0x2e, 0x31, 
-                      0x2e, 0x34, 0x2e, 0x33, 0x31, 0x39, 
-                    0x01, 0x01, ( byte ) 0xff,          // criticality: false
-                    0x04, 0x0D, 
-                      0x30, 0x0B, 
-                        0x02, 0x01, 0x05,               // Size = 5, cookie = "abcdef" 
-                        0x04, 0x06, 'a', 'b', 'c', 'd', 'e', 'f' } );
+            { 0x30, 0x3A, // LDAPMessage ::=SEQUENCE {
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x61,
+                0x07, // CHOICE { ..., bindResponse BindResponse, ...
+                      // BindResponse ::= APPLICATION[1] SEQUENCE {
+                      // COMPONENTS OF LDAPResult,
+                0x0A,
+                0x01,
+                0x00, // LDAPResult ::= SEQUENCE {
+                      // resultCode ENUMERATED {
+                      // success (0), ...
+                      // },
+                0x04,
+                0x00, // matchedDN LDAPDN,
+                0x04,
+                0x00, // errorMessage LDAPString,
+                      // referral [3] Referral OPTIONAL }
+                      // serverSaslCreds [7] OCTET STRING OPTIONAL }
+                ( byte ) 0xa0,
+                0x2C, // controls
+                0x30,
+                0x2A, // The PagedSearchControl
+                0x04,
+                0x16, // Oid : 1.2.840.113556.1.4.319
+                0x31,
+                0x2e,
+                0x32,
+                0x2e,
+                0x38,
+                0x34,
+                0x30,
+                0x2e,
+                0x31,
+                0x31,
+                0x33,
+                0x35,
+                0x35,
+                0x36,
+                0x2e,
+                0x31,
+                0x2e,
+                0x34,
+                0x2e,
+                0x33,
+                0x31,
+                0x39,
+                0x01,
+                0x01,
+                ( byte ) 0xff, // criticality: false
+                0x04,
+                0x0D,
+                0x30,
+                0x0B,
+                0x02,
+                0x01,
+                0x05, // Size = 5, cookie = "abcdef" 
+                0x04,
+                0x06,
+                'a',
+                'b',
+                'c',
+                'd',
+                'e',
+                'f' } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -235,22 +284,30 @@ public class BindResponseTest extends Ab
 
         stream.put( new byte[]
             { 0x30, 0x0E, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x61, 0x09, // CHOICE { ..., bindResponse BindResponse, ...
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x61,
+                0x09, // CHOICE { ..., bindResponse BindResponse, ...
                 // BindResponse ::= APPLICATION[1] SEQUENCE {
                 // COMPONENTS OF LDAPResult,
-                0x0A, 0x01, 0x00, // LDAPResult ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x00, // LDAPResult ::= SEQUENCE {
                 // resultCode ENUMERATED {
                 // success (0), ...
                 // },
-                0x04, 0x00, // matchedDN LDAPDN,
-                0x04, 0x00, // errorMessage LDAPString,
+                0x04,
+                0x00, // matchedDN LDAPDN,
+                0x04,
+                0x00, // errorMessage LDAPString,
                 // referral [3] Referral OPTIONAL }
-                ( byte ) 0x87, 0x00 // serverSaslCreds [7] OCTET STRING OPTIONAL
+                ( byte ) 0x87,
+                0x00 // serverSaslCreds [7] OCTET STRING OPTIONAL
             // }
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -274,7 +331,7 @@ public class BindResponseTest extends Ab
         assertEquals( ResultCodeEnum.SUCCESS, bindResponse.getLdapResult().getResultCode() );
         assertEquals( "", bindResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", bindResponse.getLdapResult().getDiagnosticMessage() );
-        assertEquals( "", Strings.utf8ToString(bindResponse.getServerSaslCreds()) );
+        assertEquals( "", Strings.utf8ToString( bindResponse.getServerSaslCreds() ) );
 
         // Check the encoding
         try
@@ -284,7 +341,7 @@ public class BindResponseTest extends Ab
             // Check the length
             assertEquals( 0x10, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -309,28 +366,59 @@ public class BindResponseTest extends Ab
 
         stream.put( new byte[]
             { 0x30, 0x2B, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x61, 0x09, // CHOICE { ..., bindResponse BindResponse, ...
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x61,
+                0x09, // CHOICE { ..., bindResponse BindResponse, ...
                 // BindResponse ::= APPLICATION[1] SEQUENCE {
                 // COMPONENTS OF LDAPResult,
-                  0x0A, 0x01, 0x00, // LDAPResult ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x00, // LDAPResult ::= SEQUENCE {
                 // resultCode ENUMERATED {
                 // success (0), ...
                 // },
-                  0x04, 0x00, // matchedDN LDAPDN,
-                  0x04, 0x00, // errorMessage LDAPString,
+                0x04,
+                0x00, // matchedDN LDAPDN,
+                0x04,
+                0x00, // errorMessage LDAPString,
                 // referral [3] Referral OPTIONAL }
-                  ( byte ) 0x87, 0x00, // serverSaslCreds [7] OCTET STRING
+                ( byte ) 0x87,
+                0x00, // serverSaslCreds [7] OCTET STRING
                 // OPTIONAL }
-                ( byte ) 0xA0, 0x1B, // A control
-                  0x30, 0x19, 
-                    0x04, 0x17, 
-                      0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30,
-                      0x2E, 0x31, 0x2E, 0x31, 0x31, 0x33, 0x37, 0x33, 
-                      0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 
-              } );
+                ( byte ) 0xA0,
+                0x1B, // A control
+                0x30,
+                0x19,
+                0x04,
+                0x17,
+                0x32,
+                0x2E,
+                0x31,
+                0x36,
+                0x2E,
+                0x38,
+                0x34,
+                0x30,
+                0x2E,
+                0x31,
+                0x2E,
+                0x31,
+                0x31,
+                0x33,
+                0x37,
+                0x33,
+                0x30,
+                0x2E,
+                0x33,
+                0x2E,
+                0x34,
+                0x2E,
+                0x32
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -354,7 +442,7 @@ public class BindResponseTest extends Ab
         assertEquals( ResultCodeEnum.SUCCESS, bindResponse.getLdapResult().getResultCode() );
         assertEquals( "", bindResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", bindResponse.getLdapResult().getDiagnosticMessage() );
-        assertEquals( "", Strings.utf8ToString(bindResponse.getServerSaslCreds()) );
+        assertEquals( "", Strings.utf8ToString( bindResponse.getServerSaslCreds() ) );
 
         // Check the Control
         Map<String, Control> controls = bindResponse.getControls();
@@ -362,7 +450,8 @@ public class BindResponseTest extends Ab
         assertEquals( 1, controls.size() );
 
         @SuppressWarnings("unchecked")
-        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );
+        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() ) );
 
@@ -374,7 +463,7 @@ public class BindResponseTest extends Ab
             // Check the length
             assertEquals( 0x2D, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -398,26 +487,36 @@ public class BindResponseTest extends Ab
 
         stream.put( new byte[]
             { 0x30, 0x10, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x61, 0x0B, // CHOICE { ..., bindResponse BindResponse, ...
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x61,
+                0x0B, // CHOICE { ..., bindResponse BindResponse, ...
                 // BindResponse ::= APPLICATION[1] SEQUENCE {
                 // COMPONENTS OF LDAPResult,
-                0x0A, 0x01, 0x00, // LDAPResult ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x00, // LDAPResult ::= SEQUENCE {
                 // resultCode ENUMERATED {
                 // success (0), ...
                 // },
-                0x04, 0x00, // matchedDN LDAPDN,
-                0x04, 0x00, // errorMessage LDAPString,
+                0x04,
+                0x00, // matchedDN LDAPDN,
+                0x04,
+                0x00, // errorMessage LDAPString,
                 // referral [3] Referral OPTIONAL }
-                ( byte ) 0x87, 0x02, 'A', 'B' // serverSaslCreds [7] OCTET
+                ( byte ) 0x87,
+                0x02,
+                'A',
+                'B' // serverSaslCreds [7] OCTET
             // STRING OPTIONAL }
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<BindResponseDecorator> container = 
+        LdapMessageContainer<BindResponseDecorator> container =
             new LdapMessageContainer<BindResponseDecorator>( codec );
 
         // Decode the BindResponse PDU
@@ -438,7 +537,7 @@ public class BindResponseTest extends Ab
         assertEquals( ResultCodeEnum.SUCCESS, bindResponse.getLdapResult().getResultCode() );
         assertEquals( "", bindResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", bindResponse.getLdapResult().getDiagnosticMessage() );
-        assertEquals( "AB", Strings.utf8ToString(bindResponse.getServerSaslCreds()) );
+        assertEquals( "AB", Strings.utf8ToString( bindResponse.getServerSaslCreds() ) );
 
         // Check the encoding
         try
@@ -448,7 +547,7 @@ public class BindResponseTest extends Ab
             // Check the length
             assertEquals( 0x12, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -472,8 +571,11 @@ public class BindResponseTest extends Ab
 
         stream.put( new byte[]
             { 0x30, 0x05, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x61, 0x00, // CHOICE { ..., bindResponse BindResponse, ...
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x61,
+                0x00, // CHOICE { ..., bindResponse BindResponse, ...
             } );
 
         stream.flip();

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java Tue Jan 24 17:27:00 2012
@@ -69,27 +69,72 @@ public class CompareRequestTest extends 
         stream.put( new byte[]
             { 0x30,
                 0x36, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 // CHOICE { ..., compareRequest CompareRequest, ...
                 0x6E,
                 0x31, // CompareRequest ::= [APPLICATION 14] SEQUENCE {
                 // entry LDAPDN,
-                0x04, 0x20, 'c', 'n', '=', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm',
+                0x04,
+                0x20,
+                'c',
+                'n',
+                '=',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm',
                 // ava AttributeValueAssertion }
-                0x30, 0x0D, // AttributeValueAssertion ::= SEQUENCE {
+                0x30,
+                0x0D, // AttributeValueAssertion ::= SEQUENCE {
                 // attributeDesc AttributeDescription,
-                0x04, 0x04, 't', 'e', 's', 't',
+                0x04,
+                0x04,
+                't',
+                'e',
+                's',
+                't',
                 // assertionValue AssertionValue }
-                0x04, 0x05, 'v', 'a', 'l', 'u', 'e' } );
+                0x04,
+                0x05,
+                'v',
+                'a',
+                'l',
+                'u',
+                'e' } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareRequestDecorator> container 
-            = new LdapMessageContainer<CompareRequestDecorator>( codec );
+        LdapMessageContainer<CompareRequestDecorator> container = new LdapMessageContainer<CompareRequestDecorator>(
+            codec );
 
         // Decode the CompareRequest PDU
         try
@@ -118,7 +163,7 @@ public class CompareRequestTest extends 
             // Check the length
             assertEquals( 0x38, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -142,16 +187,19 @@ public class CompareRequestTest extends 
 
         stream.put( new byte[]
             { 0x30, 0x05, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
                 // CHOICE { ..., compareRequest CompareRequest, ...
-                0x6E, 0x00 // CompareRequest ::= [APPLICATION 14] SEQUENCE {
-            } );
+                0x6E,
+                0x00 // CompareRequest ::= [APPLICATION 14] SEQUENCE {
+        } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareRequestDecorator> container 
-        = new LdapMessageContainer<CompareRequestDecorator>( codec );
+        LdapMessageContainer<CompareRequestDecorator> container = new LdapMessageContainer<CompareRequestDecorator>(
+            codec );
 
         // Decode the CompareRequest PDU
         try
@@ -178,22 +226,38 @@ public class CompareRequestTest extends 
 
         stream.put( new byte[]
             { 0x30, 0x16, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
                 // CHOICE { ..., compareRequest CompareRequest, ...
-                0x6E, 0x11, // CompareRequest ::= [APPLICATION 14] SEQUENCE {
-                0x04, 0x00, // entry LDAPDN,
+                0x6E,
+                0x11, // CompareRequest ::= [APPLICATION 14] SEQUENCE {
+                0x04,
+                0x00, // entry LDAPDN,
                 // ava AttributeValueAssertion }
-                0x30, 0x0D, // AttributeValueAssertion ::= SEQUENCE {
+                0x30,
+                0x0D, // AttributeValueAssertion ::= SEQUENCE {
                 // attributeDesc AttributeDescription,
-                0x04, 0x04, 't', 'e', 's', 't',
+                0x04,
+                0x04,
+                't',
+                'e',
+                's',
+                't',
                 // assertionValue AssertionValue }
-                0x04, 0x05, 'v', 'a', 'l', 'u', 'e' } );
+                0x04,
+                0x05,
+                'v',
+                'a',
+                'l',
+                'u',
+                'e' } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareRequestDecorator> container 
-            = new LdapMessageContainer<CompareRequestDecorator>( codec );
+        LdapMessageContainer<CompareRequestDecorator> container = new LdapMessageContainer<CompareRequestDecorator>(
+            codec );
 
         // Decode the CompareRequest PDU
         try
@@ -221,23 +285,57 @@ public class CompareRequestTest extends 
         stream.put( new byte[]
             { 0x30,
                 0x29, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 // CHOICE { ..., compareRequest CompareRequest, ...
                 0x6E,
                 0x24, // CompareRequest ::= [APPLICATION 14] SEQUENCE {
                 // entry LDAPDN,
-                0x04, 0x20, 'c', 'n', '=', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm',
+                0x04,
+                0x20,
+                'c',
+                'n',
+                '=',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm',
                 // ava AttributeValueAssertion }
-                0x30, 0x00 // AttributeValueAssertion ::= SEQUENCE {
-            } );
+                0x30,
+                0x00 // AttributeValueAssertion ::= SEQUENCE {
+        } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareRequestDecorator> container 
-            = new LdapMessageContainer<CompareRequestDecorator>( codec );
+        LdapMessageContainer<CompareRequestDecorator> container = new LdapMessageContainer<CompareRequestDecorator>(
+            codec );
 
         // Decode the CompareRequest PDU
         try
@@ -265,23 +363,57 @@ public class CompareRequestTest extends 
         stream.put( new byte[]
             { 0x30,
                 0x29, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 // CHOICE { ..., compareRequest CompareRequest, ...
                 0x6E,
                 0x24, // CompareRequest ::= [APPLICATION 14] SEQUENCE {
                 // entry LDAPDN,
-                0x04, 0x20, 'c', 'n', ':', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm',
+                0x04,
+                0x20,
+                'c',
+                'n',
+                ':',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm',
                 // ava AttributeValueAssertion }
-                0x30, 0x00 // AttributeValueAssertion ::= SEQUENCE {
-            } );
+                0x30,
+                0x00 // AttributeValueAssertion ::= SEQUENCE {
+        } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareRequestDecorator> container 
-            = new LdapMessageContainer<CompareRequestDecorator>( codec );
+        LdapMessageContainer<CompareRequestDecorator> container = new LdapMessageContainer<CompareRequestDecorator>(
+            codec );
 
         // Decode the CompareRequest PDU
         try
@@ -314,23 +446,58 @@ public class CompareRequestTest extends 
         stream.put( new byte[]
             { 0x30,
                 0x2B, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 // CHOICE { ..., compareRequest CompareRequest, ...
                 0x6E,
                 0x26, // CompareRequest ::= [APPLICATION 14] SEQUENCE {
                 // entry LDAPDN,
-                0x04, 0x20, 'c', 'n', '=', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm',
+                0x04,
+                0x20,
+                'c',
+                'n',
+                '=',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm',
                 // ava AttributeValueAssertion }
-                0x30, 0x02, // AttributeValueAssertion ::= SEQUENCE {
-                0x04, 0x00 } );
+                0x30,
+                0x02, // AttributeValueAssertion ::= SEQUENCE {
+                0x04,
+                0x00 } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareRequestDecorator> container 
-            = new LdapMessageContainer<CompareRequestDecorator>( codec );
+        LdapMessageContainer<CompareRequestDecorator> container = new LdapMessageContainer<CompareRequestDecorator>(
+            codec );
 
         // Decode the CompareRequest PDU
         try
@@ -363,27 +530,67 @@ public class CompareRequestTest extends 
         stream.put( new byte[]
             { 0x30,
                 0x31, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 // CHOICE { ..., compareRequest CompareRequest, ...
                 0x6E,
                 0x2C, // CompareRequest ::= [APPLICATION 14] SEQUENCE {
                 // entry LDAPDN,
-                0x04, 0x20, 'c', 'n', '=', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm',
+                0x04,
+                0x20,
+                'c',
+                'n',
+                '=',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm',
                 // ava AttributeValueAssertion }
-                0x30, 0x08, // AttributeValueAssertion ::= SEQUENCE {
+                0x30,
+                0x08, // AttributeValueAssertion ::= SEQUENCE {
                 // attributeDesc AttributeDescription,
-                0x04, 0x04, 't', 'e', 's', 't',
+                0x04,
+                0x04,
+                't',
+                'e',
+                's',
+                't',
                 // assertionValue AssertionValue }
-                0x04, 0x00 } );
+                0x04,
+                0x00 } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareRequestDecorator> container 
-            = new LdapMessageContainer<CompareRequestDecorator>( codec );
+        LdapMessageContainer<CompareRequestDecorator> container = new LdapMessageContainer<CompareRequestDecorator>(
+            codec );
 
         // Decode the CompareRequest PDU
         try
@@ -412,7 +619,7 @@ public class CompareRequestTest extends 
             // Check the length
             assertEquals( 0x33, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -445,25 +652,94 @@ public class CompareRequestTest extends 
                 0x6E,
                 0x31, // CompareRequest ::= [APPLICATION 14] SEQUENCE {
                 // entry LDAPDN,
-                0x04, 0x20, 'c', 'n', '=', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm',
+                0x04,
+                0x20,
+                'c',
+                'n',
+                '=',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm',
                 // ava AttributeValueAssertion }
                 0x30,
                 0x0D, // AttributeValueAssertion ::= SEQUENCE {
                 // attributeDesc AttributeDescription,
-                0x04, 0x04, 't', 'e', 's', 't',
+                0x04,
+                0x04,
+                't',
+                'e',
+                's',
+                't',
                 // assertionValue AssertionValue }
-                0x04, 0x05, 'v', 'a', 'l', 'u', 'e', ( byte ) 0xA0,
+                0x04,
+                0x05,
+                'v',
+                'a',
+                'l',
+                'u',
+                'e',
+                ( byte ) 0xA0,
                 0x1B, // A control
-                0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
-                0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
+                0x30,
+                0x19,
+                0x04,
+                0x17,
+                0x32,
+                0x2E,
+                0x31,
+                0x36,
+                0x2E,
+                0x38,
+                0x34,
+                0x30,
+                0x2E,
+                0x31,
+                0x2E,
+                0x31,
+                0x31,
+                0x33,
+                0x37,
+                0x33,
+                0x30,
+                0x2E,
+                0x33,
+                0x2E,
+                0x34,
+                0x2E,
+                0x32 } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareRequestDecorator> container 
-            = new LdapMessageContainer<CompareRequestDecorator>( codec );
+        LdapMessageContainer<CompareRequestDecorator> container = new LdapMessageContainer<CompareRequestDecorator>(
+            codec );
 
         // Decode the CompareRequest PDU
         try
@@ -490,7 +766,8 @@ public class CompareRequestTest extends 
         assertEquals( 1, controls.size() );
 
         @SuppressWarnings("unchecked")
-        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );
+        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() ) );
 
@@ -502,7 +779,7 @@ public class CompareRequestTest extends 
             // Check the length
             assertEquals( 0x55, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java Tue Jan 24 17:27:00 2012
@@ -66,25 +66,32 @@ public class CompareResponseTest extends
 
         stream.put( new byte[]
             { 0x30, 0x0C, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x6F, 0x07, // CHOICE { ..., compareResponse CompareResponse,
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x6F,
+                0x07, // CHOICE { ..., compareResponse CompareResponse,
                 // ...
                 // CompareResponse ::= [APPLICATION 15] LDAPResult
-                0x0A, 0x01, 0x00, // LDAPResult ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x00, // LDAPResult ::= SEQUENCE {
                 // resultCode ENUMERATED {
                 // success (0), ...
                 // },
-                0x04, 0x00, // matchedDN LDAPDN,
-                0x04, 0x00 // errorMessage LDAPString,
+                0x04,
+                0x00, // matchedDN LDAPDN,
+                0x04,
+                0x00 // errorMessage LDAPString,
             // referral [3] Referral OPTIONAL }
             // }
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareResponseDecorator> container = 
+        LdapMessageContainer<CompareResponseDecorator> container =
             new LdapMessageContainer<CompareResponseDecorator>( codec );
 
         // Decode the CompareResponse PDU
@@ -114,7 +121,7 @@ public class CompareResponseTest extends
             // Check the length
             assertEquals( 0x0E, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -160,14 +167,39 @@ public class CompareResponseTest extends
                 // }
                 ( byte ) 0xA0,
                 0x1B, // A control
-                0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
-                0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
+                0x30,
+                0x19,
+                0x04,
+                0x17,
+                0x32,
+                0x2E,
+                0x31,
+                0x36,
+                0x2E,
+                0x38,
+                0x34,
+                0x30,
+                0x2E,
+                0x31,
+                0x2E,
+                0x31,
+                0x31,
+                0x33,
+                0x37,
+                0x33,
+                0x30,
+                0x2E,
+                0x33,
+                0x2E,
+                0x34,
+                0x2E,
+                0x32 } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareResponseDecorator> container = 
+        LdapMessageContainer<CompareResponseDecorator> container =
             new LdapMessageContainer<CompareResponseDecorator>( codec );
 
         // Decode the CompareResponse PDU
@@ -195,7 +227,8 @@ public class CompareResponseTest extends
         assertEquals( 1, controls.size() );
 
         @SuppressWarnings("unchecked")
-        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );
+        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() ) );
 
@@ -207,7 +240,7 @@ public class CompareResponseTest extends
             // Check the length
             assertEquals( 0x2B, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -231,15 +264,18 @@ public class CompareResponseTest extends
 
         stream.put( new byte[]
             { 0x30, 0x05, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x6F, 0x00 // CHOICE { ..., compareResponse CompareResponse,
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x6F,
+                0x00 // CHOICE { ..., compareResponse CompareResponse,
             // ...
-            } );
+        } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<CompareResponseDecorator> container = 
+        LdapMessageContainer<CompareResponseDecorator> container =
             new LdapMessageContainer<CompareResponseDecorator>( codec );
 
         // Decode a CompareResponse message

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java Tue Jan 24 17:27:00 2012
@@ -76,14 +76,47 @@ public class DelRequestTest extends Abst
                 0x01, // messageID MessageID
                 // CHOICE { ..., delRequest DelRequest, ...
                 // DelRequest ::= [APPLICATION 10] LDAPDN;
-                0x4A, 0x20, 'c', 'n', '=', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm' } );
+                0x4A,
+                0x20,
+                'c',
+                'n',
+                '=',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm' } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>( codec );
+        LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>(
+            codec );
 
         // Decode a DelRequest PDU
         try
@@ -115,7 +148,7 @@ public class DelRequestTest extends Abst
             // Check the length
             assertEquals( 0x27, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -145,13 +178,46 @@ public class DelRequestTest extends Abst
                 0x01, // messageID MessageID
                 // CHOICE { ..., delRequest DelRequest, ...
                 // DelRequest ::= [APPLICATION 10] LDAPDN;
-                0x4A, 0x20, 'c', 'n', ':', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm' } );
+                0x4A,
+                0x20,
+                'c',
+                'n',
+                ':',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm' } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>( codec );
+        LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>(
+            codec );
 
         // Decode a DelRequest PDU
         try
@@ -184,16 +250,20 @@ public class DelRequestTest extends Abst
 
         stream.put( new byte[]
             { 0x30, 0x05, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
                 // CHOICE { ..., delRequest DelRequest, ...
                 // DelRequest ::= [APPLICATION 10] LDAPDN;
-                0x4A, 0x00 // Empty Dn
-            } );
+                0x4A,
+                0x00 // Empty Dn
+        } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>( codec );
+        LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>(
+            codec );
 
         // Decode a DelRequest PDU
         try
@@ -227,17 +297,76 @@ public class DelRequestTest extends Abst
                 0x01, // messageID MessageID
                 // CHOICE { ..., delRequest DelRequest, ...
                 // DelRequest ::= [APPLICATION 10] LDAPDN;
-                0x4A, 0x20, 'c', 'n', '=', 't', 'e', 's', 't', 'M', 'o', 'd', 'i', 'f', 'y', ',', 'o', 'u', '=', 'u',
-                's', 'e', 'r', 's', ',', 'o', 'u', '=', 's', 'y', 's', 't', 'e', 'm', ( byte ) 0xA0,
+                0x4A,
+                0x20,
+                'c',
+                'n',
+                '=',
+                't',
+                'e',
+                's',
+                't',
+                'M',
+                'o',
+                'd',
+                'i',
+                'f',
+                'y',
+                ',',
+                'o',
+                'u',
+                '=',
+                'u',
+                's',
+                'e',
+                'r',
+                's',
+                ',',
+                'o',
+                'u',
+                '=',
+                's',
+                'y',
+                's',
+                't',
+                'e',
+                'm',
+                ( byte ) 0xA0,
                 0x1B, // A control
-                0x30, 0x19, 0x04, 0x17, 0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 0x2E, 0x31, 0x2E, 0x31, 0x31,
-                0x33, 0x37, 0x33, 0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32 } );
+                0x30,
+                0x19,
+                0x04,
+                0x17,
+                0x32,
+                0x2E,
+                0x31,
+                0x36,
+                0x2E,
+                0x38,
+                0x34,
+                0x30,
+                0x2E,
+                0x31,
+                0x2E,
+                0x31,
+                0x31,
+                0x33,
+                0x37,
+                0x33,
+                0x30,
+                0x2E,
+                0x33,
+                0x2E,
+                0x34,
+                0x2E,
+                0x32 } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>( codec );
+        LdapMessageContainer<DeleteRequestDecorator> container = new LdapMessageContainer<DeleteRequestDecorator>(
+            codec );
 
         // Decode a DelRequest PDU
         try
@@ -262,7 +391,8 @@ public class DelRequestTest extends Abst
         assertEquals( 1, controls.size() );
 
         @SuppressWarnings("unchecked")
-        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );
+        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() ) );
 
@@ -279,7 +409,7 @@ public class DelRequestTest extends Abst
             // Check the length
             assertEquals( 0x44, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java Tue Jan 24 17:27:00 2012
@@ -67,7 +67,8 @@ public class DelResponseTest extends Abs
         stream.put( new byte[]
             { 0x30,
                 0x2B, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 0x6B,
                 0x26, // CHOICE { ..., delResponse DelResponse, ...
@@ -80,18 +81,49 @@ public class DelResponseTest extends Abs
                 // },
                 0x04,
                 0x1F, // matchedDN LDAPDN,
-                'u', 'i', 'd', '=', 'a', 'k', 'a', 'r', 'a', 's', 'u', 'l', 'u', ',', 'd', 'c', '=', 'e', 'x', 'a',
-                'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x04, 0x00 // errorMessage
+                'u',
+                'i',
+                'd',
+                '=',
+                'a',
+                'k',
+                'a',
+                'r',
+                'a',
+                's',
+                'u',
+                'l',
+                'u',
+                ',',
+                'd',
+                'c',
+                '=',
+                'e',
+                'x',
+                'a',
+                'm',
+                'p',
+                'l',
+                'e',
+                ',',
+                'd',
+                'c',
+                '=',
+                'c',
+                'o',
+                'm',
+                0x04,
+                0x00 // errorMessage
             // LDAPString,
             // referral [3] Referral OPTIONAL }
             // }
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<DeleteResponseDecorator> container = 
+        LdapMessageContainer<DeleteResponseDecorator> container =
             new LdapMessageContainer<DeleteResponseDecorator>( codec );
 
         // Decode the DelResponse PDU
@@ -121,7 +153,7 @@ public class DelResponseTest extends Abs
             // Check the length
             assertEquals( 0x2D, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -145,17 +177,19 @@ public class DelResponseTest extends Abs
 
         stream.put( new byte[]
             { 0x30, 0x05, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x6B, 0x00, // CHOICE { ..., delResponse DelResponse, ...
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x6B,
+                0x00, // CHOICE { ..., delResponse DelResponse, ...
             } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<DeleteResponseDecorator> container = 
+        LdapMessageContainer<DeleteResponseDecorator> container =
             new LdapMessageContainer<DeleteResponseDecorator>( codec );
 
-
         // Decode a DelResponse message
         try
         {
@@ -183,35 +217,94 @@ public class DelResponseTest extends Abs
 
         stream.put( new byte[]
             {
-                0x30, 0x48,               // LDAPMessage ::=SEQUENCE {
-                  0x02, 0x01, 0x01,       // messageID MessageID
-                  0x6B, 0x26,             // CHOICE { ..., delResponse DelResponse, ...
-                                          // DelResponse ::= [APPLICATION 11] LDAPResult
-                    0x0A, 0x01, 0x21,     // LDAPResult ::= SEQUENCE {
-                                          // resultCode ENUMERATED {
-                                          // success (0), ...
-                                          // },
-                    0x04, 0x1F,           // matchedDN LDAPDN,
-                  'u', 'i', 'd', '=', 'a', 'k', 'a', 'r', 'a', 's', 'u', 'l', 'u', ',', 'd', 'c', '=', 'e', 'x', 'a',
-                  'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm',
-                    0x04, 0x00,           // errorMessage
-                                          // LDAPString,
-                                          // referral [3] Referral OPTIONAL }
-                                          // }
-                    ( byte ) 0xA0, 0x1B,  // A control
-                      0x30, 0x19, 
-                        0x04, 0x17, 
-                          0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 
-                          0x2E, 0x31, 0x2E, 0x31, 0x31, 0x33, 0x37, 0x33, 
-                          0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32
+                0x30, 0x48, // LDAPMessage ::=SEQUENCE {
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x6B,
+                0x26, // CHOICE { ..., delResponse DelResponse, ...
+                      // DelResponse ::= [APPLICATION 11] LDAPResult
+                0x0A,
+                0x01,
+                0x21, // LDAPResult ::= SEQUENCE {
+                      // resultCode ENUMERATED {
+                      // success (0), ...
+                      // },
+                0x04,
+                0x1F, // matchedDN LDAPDN,
+                'u',
+                'i',
+                'd',
+                '=',
+                'a',
+                'k',
+                'a',
+                'r',
+                'a',
+                's',
+                'u',
+                'l',
+                'u',
+                ',',
+                'd',
+                'c',
+                '=',
+                'e',
+                'x',
+                'a',
+                'm',
+                'p',
+                'l',
+                'e',
+                ',',
+                'd',
+                'c',
+                '=',
+                'c',
+                'o',
+                'm',
+                0x04,
+                0x00, // errorMessage
+                      // LDAPString,
+                      // referral [3] Referral OPTIONAL }
+                      // }
+                ( byte ) 0xA0,
+                0x1B, // A control
+                0x30,
+                0x19,
+                0x04,
+                0x17,
+                0x32,
+                0x2E,
+                0x31,
+                0x36,
+                0x2E,
+                0x38,
+                0x34,
+                0x30,
+                0x2E,
+                0x31,
+                0x2E,
+                0x31,
+                0x31,
+                0x33,
+                0x37,
+                0x33,
+                0x30,
+                0x2E,
+                0x33,
+                0x2E,
+                0x34,
+                0x2E,
+                0x32
 
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<DeleteResponseDecorator> container = 
+        LdapMessageContainer<DeleteResponseDecorator> container =
             new LdapMessageContainer<DeleteResponseDecorator>( codec );
 
         // Decode the DelResponse PDU
@@ -239,7 +332,8 @@ public class DelResponseTest extends Abs
         assertEquals( 1, controls.size() );
 
         @SuppressWarnings("unchecked")
-        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );
+        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() ) );
 

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java Tue Jan 24 17:27:00 2012
@@ -63,20 +63,43 @@ public class ExtendedRequestTest extends
 
         stream.put( new byte[]
             { 0x30, 0x1B, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
                 // CHOICE { ..., extendedReq ExtendedRequest, ...
-                0x77, 0x16, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
+                0x77,
+                0x16, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
                 // requestName [0] LDAPOID,
-                ( byte ) 0x80, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2',
+                ( byte ) 0x80,
+                0x0D,
+                '1',
+                '.',
+                '3',
+                '.',
+                '6',
+                '.',
+                '1',
+                '.',
+                '5',
+                '.',
+                '5',
+                '.',
+                '2',
                 // requestValue [1] OCTET STRING OPTIONAL }
-                ( byte ) 0x81, 0x05, 'v', 'a', 'l', 'u', 'e' } );
+                ( byte ) 0x81,
+                0x05,
+                'v',
+                'a',
+                'l',
+                'u',
+                'e' } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<ExtendedRequestDecorator<?,?>> container = 
-            new LdapMessageContainer<ExtendedRequestDecorator<?,?>>(  codec );
+        LdapMessageContainer<ExtendedRequestDecorator<?, ?>> container =
+            new LdapMessageContainer<ExtendedRequestDecorator<?, ?>>( codec );
 
         // Decode the ExtendedRequest PDU
         try
@@ -90,11 +113,11 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequestDecorator<?,?> extendedRequest = container.getMessage();
+        ExtendedRequestDecorator<?, ?> extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
-        assertEquals( "value", Strings.utf8ToString(extendedRequest.getRequestValue()) );
+        assertEquals( "value", Strings.utf8ToString( extendedRequest.getRequestValue() ) );
 
         // Check the encoding
         try
@@ -104,7 +127,7 @@ public class ExtendedRequestTest extends
             // Check the length
             assertEquals( 0x1D, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -129,25 +152,72 @@ public class ExtendedRequestTest extends
         stream.put( new byte[]
             { 0x30,
                 0x38, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 // CHOICE { ..., extendedReq ExtendedRequest, ...
                 0x77,
                 0x16, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
                 // requestName [0] LDAPOID,
-                ( byte ) 0x80, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2',
+                ( byte ) 0x80,
+                0x0D,
+                '1',
+                '.',
+                '3',
+                '.',
+                '6',
+                '.',
+                '1',
+                '.',
+                '5',
+                '.',
+                '5',
+                '.',
+                '2',
                 // requestValue [1] OCTET STRING OPTIONAL }
-                ( byte ) 0x81, 0x05, 'v', 'a', 'l', 'u', 'e', ( byte ) 0xA0,
+                ( byte ) 0x81,
+                0x05,
+                'v',
+                'a',
+                'l',
+                'u',
+                'e',
+                ( byte ) 0xA0,
                 0x1B, // A control
-                0x30, 0x19, 0x04, 0x17, '2', '.', '1', '6', '.', '8', '4', '0', '.', '1', '.', '1', '1', '3', '7', '3',
-                '0', '.', '3', '.', '4', '.', '2' } );
+                0x30,
+                0x19,
+                0x04,
+                0x17,
+                '2',
+                '.',
+                '1',
+                '6',
+                '.',
+                '8',
+                '4',
+                '0',
+                '.',
+                '1',
+                '.',
+                '1',
+                '1',
+                '3',
+                '7',
+                '3',
+                '0',
+                '.',
+                '3',
+                '.',
+                '4',
+                '.',
+                '2' } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<ExtendedRequestDecorator<?,?>> container = 
-            new LdapMessageContainer<ExtendedRequestDecorator<?,?>>(  codec );
+        LdapMessageContainer<ExtendedRequestDecorator<?, ?>> container =
+            new LdapMessageContainer<ExtendedRequestDecorator<?, ?>>( codec );
 
         // Decode the ExtendedRequest PDU
         try
@@ -161,11 +231,11 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequestDecorator<?,?> extendedRequest = container.getMessage();
+        ExtendedRequestDecorator<?, ?> extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
-        assertEquals( "value", Strings.utf8ToString(extendedRequest.getRequestValue()) );
+        assertEquals( "value", Strings.utf8ToString( extendedRequest.getRequestValue() ) );
 
         // Check the Control
         Map<String, Control> controls = extendedRequest.getControls();
@@ -174,7 +244,8 @@ public class ExtendedRequestTest extends
         assertTrue( extendedRequest.hasControl( "2.16.840.1.113730.3.4.2" ) );
 
         @SuppressWarnings("unchecked")
-        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) extendedRequest.getControl( "2.16.840.1.113730.3.4.2" );
+        CodecControl<Control> control = ( org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) extendedRequest
+            .getControl( "2.16.840.1.113730.3.4.2" );
         assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );
 
         // Check the encoding
@@ -185,7 +256,7 @@ public class ExtendedRequestTest extends
             // Check the length
             assertEquals( 0x3A, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -211,25 +282,65 @@ public class ExtendedRequestTest extends
         stream.put( new byte[]
             { 0x30,
                 0x31, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 // CHOICE { ..., extendedReq ExtendedRequest, ...
                 0x77,
                 0x0F, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
                 // requestName [0] LDAPOID,
-                ( byte ) 0x80, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2',
+                ( byte ) 0x80,
+                0x0D,
+                '1',
+                '.',
+                '3',
+                '.',
+                '6',
+                '.',
+                '1',
+                '.',
+                '5',
+                '.',
+                '5',
+                '.',
+                '2',
                 // requestValue [1] OCTET STRING OPTIONAL }
                 ( byte ) 0xA0,
                 0x1B, // A control
-                0x30, 0x19, 0x04, 0x17, '2', '.', '1', '6', '.', '8', '4', '0', '.', '1', '.', '1', '1', '3', '7', '3',
-                '0', '.', '3', '.', '4', '.', '2' } );
+                0x30,
+                0x19,
+                0x04,
+                0x17,
+                '2',
+                '.',
+                '1',
+                '6',
+                '.',
+                '8',
+                '4',
+                '0',
+                '.',
+                '1',
+                '.',
+                '1',
+                '1',
+                '3',
+                '7',
+                '3',
+                '0',
+                '.',
+                '3',
+                '.',
+                '4',
+                '.',
+                '2' } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<ExtendedRequestDecorator<?,?>> container = 
-            new LdapMessageContainer<ExtendedRequestDecorator<?,?>>(  codec );
+        LdapMessageContainer<ExtendedRequestDecorator<?, ?>> container =
+            new LdapMessageContainer<ExtendedRequestDecorator<?, ?>>( codec );
 
         // Decode the ExtendedRequest PDU
         try
@@ -243,11 +354,11 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequestDecorator<?,?> extendedRequest = container.getMessage();
+        ExtendedRequestDecorator<?, ?> extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
-        assertEquals( "", Strings.utf8ToString(extendedRequest.getRequestValue()) );
+        assertEquals( "", Strings.utf8ToString( extendedRequest.getRequestValue() ) );
 
         // Check the Control
         Map<String, Control> controls = extendedRequest.getControls();
@@ -257,7 +368,8 @@ public class ExtendedRequestTest extends
         assertTrue( extendedRequest.hasControl( "2.16.840.1.113730.3.4.2" ) );
 
         @SuppressWarnings("unchecked")
-        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) extendedRequest.getControl( "2.16.840.1.113730.3.4.2" );
+        CodecControl<Control> control = ( org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) extendedRequest
+            .getControl( "2.16.840.1.113730.3.4.2" );
         assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );
 
         // Check the encoding
@@ -268,7 +380,7 @@ public class ExtendedRequestTest extends
             // Check the length
             assertEquals( 0x33, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -292,16 +404,19 @@ public class ExtendedRequestTest extends
 
         stream.put( new byte[]
             { 0x30, 0x05, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
                 // CHOICE { ..., extendedReq ExtendedRequest, ...
-                0x77, 0x00, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
+                0x77,
+                0x00, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
             } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<ExtendedRequestDecorator<?,?>> container = 
-            new LdapMessageContainer<ExtendedRequestDecorator<?,?>>(  codec );
+        LdapMessageContainer<ExtendedRequestDecorator<?, ?>> container =
+            new LdapMessageContainer<ExtendedRequestDecorator<?, ?>>( codec );
 
         // Decode a ExtendedRequest PDU
         try
@@ -328,16 +443,20 @@ public class ExtendedRequestTest extends
 
         stream.put( new byte[]
             { 0x30, 0x07, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
                 // CHOICE { ..., extendedReq ExtendedRequest, ...
-                0x77, 0x02, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
-                ( byte ) 0x80, 0x00 } );
+                0x77,
+                0x02, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
+                ( byte ) 0x80,
+                0x00 } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<ExtendedRequestDecorator<?,?>> container = 
-            new LdapMessageContainer<ExtendedRequestDecorator<?,?>>(  codec );
+        LdapMessageContainer<ExtendedRequestDecorator<?, ?>> container =
+            new LdapMessageContainer<ExtendedRequestDecorator<?, ?>>( codec );
 
         // Decode a ExtendedRequest PDU
         try
@@ -364,17 +483,34 @@ public class ExtendedRequestTest extends
 
         stream.put( new byte[]
             { 0x30, 0x14, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
                 // CHOICE { ..., extendedReq ExtendedRequest, ...
-                0x77, 0x0F, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
+                0x77,
+                0x0F, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
                 // requestName [0] LDAPOID,
-                ( byte ) 0x80, 0x0D, '1', '-', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2', } );
+                ( byte ) 0x80,
+                0x0D,
+                '1',
+                '-',
+                '3',
+                '.',
+                '6',
+                '.',
+                '1',
+                '.',
+                '5',
+                '.',
+                '5',
+                '.',
+                '2', } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<ExtendedRequestDecorator<?,?>> container = 
-            new LdapMessageContainer<ExtendedRequestDecorator<?,?>>(  codec );
+        LdapMessageContainer<ExtendedRequestDecorator<?, ?>> container =
+            new LdapMessageContainer<ExtendedRequestDecorator<?, ?>>( codec );
 
         // Decode a ExtendedRequest PDU
         try
@@ -401,18 +537,35 @@ public class ExtendedRequestTest extends
 
         stream.put( new byte[]
             { 0x30, 0x14, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
                 // CHOICE { ..., extendedReq ExtendedRequest, ...
-                0x77, 0x0F, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
+                0x77,
+                0x0F, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
                 // requestName [0] LDAPOID,
-                ( byte ) 0x80, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2', } );
+                ( byte ) 0x80,
+                0x0D,
+                '1',
+                '.',
+                '3',
+                '.',
+                '6',
+                '.',
+                '1',
+                '.',
+                '5',
+                '.',
+                '5',
+                '.',
+                '2', } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<ExtendedRequestDecorator<?,?>> container = 
-            new LdapMessageContainer<ExtendedRequestDecorator<?,?>>(  codec );
+        LdapMessageContainer<ExtendedRequestDecorator<?, ?>> container =
+            new LdapMessageContainer<ExtendedRequestDecorator<?, ?>>( codec );
 
         // Decode the ExtendedRequest PDU
         try
@@ -426,7 +579,7 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequestDecorator<?,?> extendedRequest = container.getMessage();
+        ExtendedRequestDecorator<?, ?> extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
@@ -439,7 +592,7 @@ public class ExtendedRequestTest extends
             // Check the length
             assertEquals( 0x16, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -464,21 +617,37 @@ public class ExtendedRequestTest extends
         stream.put( new byte[]
             { 0x30,
                 0x16, // LDAPMessage ::= SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 // CHOICE { ..., extendedReq ExtendedRequest, ...
                 0x77,
                 0x11, // ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
                 // requestName [0] LDAPOID,
-                ( byte ) 0x80, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2', ( byte ) 0x81,
+                ( byte ) 0x80,
+                0x0D,
+                '1',
+                '.',
+                '3',
+                '.',
+                '6',
+                '.',
+                '1',
+                '.',
+                '5',
+                '.',
+                '5',
+                '.',
+                '2',
+                ( byte ) 0x81,
                 0x00 } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<ExtendedRequestDecorator<?,?>> container = 
-            new LdapMessageContainer<ExtendedRequestDecorator<?,?>>(  codec );
+        LdapMessageContainer<ExtendedRequestDecorator<?, ?>> container =
+            new LdapMessageContainer<ExtendedRequestDecorator<?, ?>>( codec );
 
         // Decode the ExtendedRequest PDU
         try
@@ -492,11 +661,11 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequestDecorator<?,?> extendedRequest = container.getMessage();
+        ExtendedRequestDecorator<?, ?> extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
-        assertEquals( "", Strings.utf8ToString(extendedRequest.getRequestValue()) );
+        assertEquals( "", Strings.utf8ToString( extendedRequest.getRequestValue() ) );
 
         // Check the encoding
         try
@@ -506,7 +675,7 @@ public class ExtendedRequestTest extends
             // Check the length
             assertEquals( 0x18, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }



Mime
View raw message