directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-server] branch master updated: Used the static Asn1Decoder class
Date Wed, 02 Jan 2019 05:14:59 GMT
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new 6489706  Used the static Asn1Decoder class
6489706 is described below

commit 64897069f57f0110ce99ae747983f43a5234c856
Author: Emmanuel Lecharny <elecharny@apache.org>
AuthorDate: Wed Jan 2 06:14:57 2019 +0100

    Used the static Asn1Decoder class
---
 .../directory/kerberos/client/KdcClientUtil.java   |  9 +--
 .../directory/kerberos/client/KdcConnection.java   |  3 +-
 .../directory/kerberos/client/KpasswdDecode.java   |  3 +-
 .../directory/kerberos/client/KdcAsRepTest.java    |  3 +-
 .../changepwd/messages/ChangePasswordError.java    |  3 +-
 .../codec/EncKdcRepPart/actions/StoreLastReq.java  |  4 +-
 .../shared/kerberos/codec/KerberosDecoder.java     | 68 ++++++----------------
 .../kerberos/codec/KerberosMessageGrammar.java     | 22 ++++---
 .../actions/AbstractReadAuthorizationData.java     |  4 +-
 .../codec/actions/AbstractReadCheckSum.java        |  4 +-
 .../codec/actions/AbstractReadEncryptedPart.java   |  4 +-
 .../codec/actions/AbstractReadEncryptionKey.java   |  4 +-
 .../codec/actions/AbstractReadHostAddress.java     |  4 +-
 .../codec/actions/AbstractReadHostAddresses.java   |  4 +-
 .../codec/actions/AbstractReadPrincipalName.java   |  4 +-
 .../kerberos/codec/apReq/actions/StoreTicket.java  |  4 +-
 .../kerberos/codec/asRep/actions/StoreKdcRep.java  |  4 +-
 .../kerberos/codec/asReq/actions/StoreKdcReq.java  |  4 +-
 .../encAsRepPart/actions/StoreEncAsRepPart.java    |  4 +-
 .../encKrbCredPart/actions/StoreTicketInfo.java    |  4 +-
 .../encTgsRepPart/actions/StoreEncTgsRepPart.java  |  4 +-
 .../encTicketPart/actions/StoreTransited.java      |  4 +-
 .../codec/etypeInfo/actions/AddETypeInfoEntry.java |  4 +-
 .../etypeInfo2/actions/AddETypeInfo2Entry.java     |  4 +-
 .../hostAddresses/actions/AddHostAddress.java      |  4 +-
 .../kerberos/codec/kdcRep/actions/AddPaData.java   |  4 +-
 .../kerberos/codec/kdcRep/actions/StoreTicket.java |  4 +-
 .../kerberos/codec/kdcReq/actions/AddPaData.java   |  4 +-
 .../codec/kdcReq/actions/StoreKdcReqBody.java      |  4 +-
 .../codec/kdcReqBody/actions/AddTicket.java        |  4 +-
 .../codec/krbCred/actions/StoreTickets.java        |  4 +-
 .../codec/krbSafe/actions/StoreSafeBody.java       |  4 +-
 .../codec/methodData/actions/AddPaData.java        |  4 +-
 .../kerberos/codec/tgsRep/actions/StoreKdcRep.java |  4 +-
 .../kerberos/codec/tgsReq/actions/StoreKdcReq.java |  4 +-
 .../shared/kerberos/codec/AdAndOrDecoderTest.java  | 32 +++-------
 .../kerberos/codec/AdIfRelevantDecoderTest.java    |  4 +-
 .../kerberos/codec/AdKdcIssuedDecoderTest.java     | 12 +---
 .../codec/AdMandatoryForKdcDecoderTest.java        |  4 +-
 .../shared/kerberos/codec/ApRepDecoderTest.java    | 18 ++----
 .../shared/kerberos/codec/ApReqDecoderTest.java    | 12 ++--
 .../shared/kerberos/codec/AsRepDecoderTest.java    | 15 ++---
 .../shared/kerberos/codec/AsReqDecoderTest.java    | 12 ++--
 .../kerberos/codec/AuthenticatorDecoderTest.java   | 18 ++----
 .../codec/AuthorizationDataDecoderTest.java        | 27 +++------
 .../codec/ChangePasswdDataDecoderTest.java         | 12 ++--
 .../shared/kerberos/codec/ChecksumDecoderTest.java | 12 ++--
 .../kerberos/codec/ETypeInfo2DecoderTest.java      |  9 +--
 .../kerberos/codec/ETypeInfo2EntryDecoderTest.java | 27 +++------
 .../kerberos/codec/ETypeInfoDecoderTest.java       |  9 +--
 .../kerberos/codec/ETypeInfoEntryDecoderTest.java  | 27 +++------
 .../kerberos/codec/EncApRepPartDecoderTest.java    | 27 +++------
 .../kerberos/codec/EncAsRepPartDecoderTest.java    |  9 +--
 .../kerberos/codec/EncKdcRepPartDecoderTest.java   | 27 +++------
 .../kerberos/codec/EncKrbCredPartDecoderTest.java  |  6 +-
 .../kerberos/codec/EncKrbPrivPartDecoderTest.java  | 18 ++----
 .../kerberos/codec/EncTgsRepPartDecoderTest.java   |  9 +--
 .../kerberos/codec/EncTicketPartDecoderTest.java   |  3 +-
 .../kerberos/codec/EncryptedDataDecoderTest.java   | 30 ++++------
 .../kerberos/codec/EncryptionKeyDecoderTest.java   | 24 +++-----
 .../kerberos/codec/HostAddressDecoderTest.java     | 24 +++-----
 .../kerberos/codec/HostAddressesDecoderTest.java   |  9 +--
 .../shared/kerberos/codec/KdcRepDecoderTest.java   | 12 ++--
 .../kerberos/codec/KdcReqBodyDecoderTest.java      | 18 ++----
 .../shared/kerberos/codec/KdcReqDecoderTest.java   | 12 ++--
 .../kerberos/codec/KerberosMessageDecoderTest.java | 10 ++--
 .../shared/kerberos/codec/KrbCredDecoderTest.java  |  4 +-
 .../kerberos/codec/KrbCredInfoDecoderTest.java     |  6 +-
 .../shared/kerberos/codec/KrbErrorDecoderTest.java | 33 ++++-------
 .../shared/kerberos/codec/KrbPrivDecoderTest.java  |  4 +-
 .../kerberos/codec/KrbSafeBodyDecoderTest.java     | 18 ++----
 .../shared/kerberos/codec/KrbSafeDecoderTest.java  |  8 +--
 .../shared/kerberos/codec/LastReqDecoderTest.java  | 18 ++----
 .../kerberos/codec/MethodDataDecoderTest.java      |  9 +--
 .../shared/kerberos/codec/PaDataDecoderTest.java   | 12 ++--
 .../kerberos/codec/PaEncTimestampDecoderTest.java  |  3 +-
 .../kerberos/codec/PaEncTsEncDecoderTest.java      | 18 ++----
 .../kerberos/codec/PrincipalNameDecoderTest.java   | 30 ++++------
 .../shared/kerberos/codec/TgsRepDecoderTest.java   | 12 ++--
 .../shared/kerberos/codec/TgsReqDecoderTest.java   |  9 +--
 .../shared/kerberos/codec/TicketDecoderTest.java   | 51 ++++++----------
 .../codec/TransitedEncodingDecoderTest.java        | 27 +++------
 .../kerberos/codec/TypedDataDecoderTest.java       | 24 ++------
 .../changepwd/service/ChangePasswordService.java   |  3 +-
 .../protocol/codec/MinaKerberosDecoder.java        |  5 +-
 .../directory/server/ldap/LdapProtocolHandler.java |  6 +-
 .../server/operations/bind/SaslBindIT.java         | 10 ++--
 87 files changed, 322 insertions(+), 699 deletions(-)

diff --git a/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KdcClientUtil.java b/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KdcClientUtil.java
index 6b79c63..c9ea7a7 100644
--- a/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KdcClientUtil.java
+++ b/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KdcClientUtil.java
@@ -80,10 +80,9 @@ public class KdcClientUtil
         {
             ByteBuffer stream = ByteBuffer.wrap( error.getEData() );
 
-            Asn1Decoder decoder = new Asn1Decoder();
             MethodDataContainer container = new MethodDataContainer();
             container.setStream( stream );
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
 
             MethodData methodData = container.getMethodData();
 
@@ -113,10 +112,9 @@ public class KdcClientUtil
     {
         ByteBuffer stream = ByteBuffer.wrap( data );
 
-        Asn1Decoder decoder = new Asn1Decoder();
         ETypeInfo2Container container = new ETypeInfo2Container();
         container.setStream( stream );
-        decoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
 
         ETypeInfo2 info2 = container.getETypeInfo2();
 
@@ -135,10 +133,9 @@ public class KdcClientUtil
     {
         ByteBuffer stream = ByteBuffer.wrap( data );
 
-        Asn1Decoder decoder = new Asn1Decoder();
         ETypeInfoContainer container = new ETypeInfoContainer();
         container.setStream( stream );
-        decoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
 
         ETypeInfo einfo = container.getETypeInfo();
 
diff --git a/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KdcConnection.java b/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KdcConnection.java
index c053778..4908bb7 100644
--- a/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KdcConnection.java
+++ b/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KdcConnection.java
@@ -29,7 +29,6 @@ import java.util.List;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.api.asn1.Asn1Object;
-import org.apache.directory.api.asn1.ber.Asn1Decoder;
 import org.apache.directory.api.util.Network;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.server.kerberos.changepwd.exceptions.ChangePasswdErrorType;
@@ -675,7 +674,7 @@ public class KdcConnection
         kerberosMessageContainer.setGathering( true );
         kerberosMessageContainer.setTCP( channel.isUseTcp() );
 
-        return ( KerberosMessage ) KerberosDecoder.decode( kerberosMessageContainer, new Asn1Decoder() );
+        return ( KerberosMessage ) KerberosDecoder.decode( kerberosMessageContainer );
     }
 
 
diff --git a/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KpasswdDecode.java b/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KpasswdDecode.java
index b27327f..b7dd117 100644
--- a/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KpasswdDecode.java
+++ b/kerberos-client/src/main/java/org/apache/directory/kerberos/client/KpasswdDecode.java
@@ -22,7 +22,6 @@ package org.apache.directory.kerberos.client;
 
 import java.nio.ByteBuffer;
 
-import org.apache.directory.api.asn1.ber.Asn1Decoder;
 import org.apache.directory.server.kerberos.changepwd.io.ChangePasswordDecoder;
 import org.apache.directory.server.kerberos.changepwd.messages.ChangePasswordReply;
 import org.apache.directory.server.kerberos.changepwd.messages.ChangePasswordRequest;
@@ -68,7 +67,7 @@ public abstract class KpasswdDecode
         kerberosMessageContainer.setGathering( true );
         kerberosMessageContainer.setTCP( false );
 
-        AsRep asReply = ( AsRep ) KerberosDecoder.decode( kerberosMessageContainer, new Asn1Decoder() );
+        AsRep asReply = ( AsRep ) KerberosDecoder.decode( kerberosMessageContainer );
 
         System.out.println( asReply );
         byte[] decryptedEncAsRepPart = cipherTextHandler.decrypt( clientKey, asReply.getEncPart(),
diff --git a/kerberos-client/src/test/java/org/apache/directory/kerberos/client/KdcAsRepTest.java b/kerberos-client/src/test/java/org/apache/directory/kerberos/client/KdcAsRepTest.java
index 2e5bb75..e8848ff 100644
--- a/kerberos-client/src/test/java/org/apache/directory/kerberos/client/KdcAsRepTest.java
+++ b/kerberos-client/src/test/java/org/apache/directory/kerberos/client/KdcAsRepTest.java
@@ -180,10 +180,9 @@ public class KdcAsRepTest extends AbstractLdapTestUnit
             stream.put( eData );
             stream.flip();
             
-            Asn1Decoder decoder = new Asn1Decoder();
             MethodDataContainer container = new MethodDataContainer();
             container.setStream( stream );
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
             MethodData padata = container.getMethodData();
             assertEquals( 2, padata.getPaDatas().length );
             assertEquals( PaDataType.PA_ENCTYPE_INFO2, padata.getPaDatas()[1].getPaDataType() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/changepwd/messages/ChangePasswordError.java b/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/changepwd/messages/ChangePasswordError.java
index 626efa1..2646033 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/changepwd/messages/ChangePasswordError.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/changepwd/messages/ChangePasswordError.java
@@ -120,11 +120,10 @@ public class ChangePasswordError extends AbstractPasswordMessage
         ByteBuffer errorBuffer = ByteBuffer.wrap( errorBytes );
 
         KrbErrorContainer container = new KrbErrorContainer( errorBuffer );
-        Asn1Decoder decoder = new Asn1Decoder();
 
         try
         {
-            decoder.decode( errorBuffer, container );
+            Asn1Decoder.decode( errorBuffer, container );
         }
         catch( DecoderException e )
         {
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java
index 7064a43..f7a7f51 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java
@@ -72,12 +72,10 @@ public class StoreLastReq extends GrammarAction<EncKdcRepPartContainer>
         }
 
         // Now, let's decode the LastReq
-        Asn1Decoder lastReqDecoder = new Asn1Decoder();
-
         LastReqContainer lastReqContainer = new LastReqContainer();
 
         // Decode the LastReq PDU
-        lastReqDecoder.decode( encKdcRepPartContainer.getStream(), lastReqContainer );
+        Asn1Decoder.decode( encKdcRepPartContainer.getStream(), lastReqContainer );
 
         LastReq lastReq = lastReqContainer.getLastReq();
 
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosDecoder.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosDecoder.java
index a55ad14..9c6c18b 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosDecoder.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosDecoder.java
@@ -79,7 +79,7 @@ public class KerberosDecoder
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
 
-    public static Object decode( KerberosMessageContainer kerberosMessageContainer, Asn1Decoder asn1Decoder ) throws DecoderException
+    public static Object decode( KerberosMessageContainer kerberosMessageContainer ) throws DecoderException
     {
         ByteBuffer buf = kerberosMessageContainer.getStream();
         
@@ -104,7 +104,7 @@ public class KerberosDecoder
         {
             try
             {
-                asn1Decoder.decode( buf, kerberosMessageContainer );
+                Asn1Decoder.decode( buf, kerberosMessageContainer );
                 
                 if ( kerberosMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
                 {
@@ -146,12 +146,10 @@ public class KerberosDecoder
         // Allocate a EncryptedData Container
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the EncryptedData PDU
         try
         {
-            kerberosDecoder.decode( stream, encryptedDataContainer );
+            Asn1Decoder.decode( stream, encryptedDataContainer );
         }
         catch ( DecoderException de )
         {
@@ -179,12 +177,10 @@ public class KerberosDecoder
         // Allocate a PaEncTsEnc Container
         Asn1Container paEncTsEncContainer = new PaEncTsEncContainer();
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the PaEncTsEnc PDU
         try
         {
-            kerberosDecoder.decode( stream, paEncTsEncContainer );
+            Asn1Decoder.decode( stream, paEncTsEncContainer );
         }
         catch ( DecoderException de )
         {
@@ -212,12 +208,10 @@ public class KerberosDecoder
         // Allocate a EncApRepPart Container
         Asn1Container encApRepPartContainer = new EncApRepPartContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the EncApRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encApRepPartContainer );
+            Asn1Decoder.decode( stream, encApRepPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -245,12 +239,10 @@ public class KerberosDecoder
         // Allocate a EncKdcRepPart Container
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the EncKdcRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encKdcRepPartContainer );
+            Asn1Decoder.decode( stream, encKdcRepPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -278,12 +270,10 @@ public class KerberosDecoder
         // Allocate a EncKrbPrivPart Container
         Asn1Container encKrbPrivPartContainer = new EncKrbPrivPartContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the EncKrbPrivPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encKrbPrivPartContainer );
+            Asn1Decoder.decode( stream, encKrbPrivPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -311,12 +301,10 @@ public class KerberosDecoder
         // Allocate a EncTicketPart Container
         Asn1Container encTicketPartContainer = new EncTicketPartContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the EncTicketPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encTicketPartContainer );
+            Asn1Decoder.decode( stream, encTicketPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -344,12 +332,10 @@ public class KerberosDecoder
         // Allocate a EncryptionKey Container
         Asn1Container encryptionKeyContainer = new EncryptionKeyContainer();
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the EncryptionKey PDU
         try
         {
-            kerberosDecoder.decode( stream, encryptionKeyContainer );
+            Asn1Decoder.decode( stream, encryptionKeyContainer );
         }
         catch ( DecoderException de )
         {
@@ -377,12 +363,10 @@ public class KerberosDecoder
         // Allocate a PrincipalName Container
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the PrincipalName PDU
         try
         {
-            kerberosDecoder.decode( stream, principalNameContainer );
+            Asn1Decoder.decode( stream, principalNameContainer );
         }
         catch ( DecoderException de )
         {
@@ -410,12 +394,10 @@ public class KerberosDecoder
         // Allocate a Ticket Container
         Asn1Container ticketContainer = new TicketContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the Ticket PDU
         try
         {
-            kerberosDecoder.decode( stream, ticketContainer );
+            Asn1Decoder.decode( stream, ticketContainer );
         }
         catch ( DecoderException de )
         {
@@ -443,12 +425,10 @@ public class KerberosDecoder
         // Allocate a Authenticator Container
         Asn1Container authenticatorContainer = new AuthenticatorContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the Ticket PDU
         try
         {
-            kerberosDecoder.decode( stream, authenticatorContainer );
+            Asn1Decoder.decode( stream, authenticatorContainer );
         }
         catch ( DecoderException de )
         {
@@ -476,12 +456,10 @@ public class KerberosDecoder
         // Allocate a AuthorizationData Container
         Asn1Container authorizationDataContainer = new AuthorizationDataContainer();
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the Ticket PDU
         try
         {
-            kerberosDecoder.decode( stream, authorizationDataContainer );
+            Asn1Decoder.decode( stream, authorizationDataContainer );
         }
         catch ( DecoderException de )
         {
@@ -509,12 +487,10 @@ public class KerberosDecoder
         // Allocate a ApRep Container
         Asn1Container apRepContainer = new ApRepContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the ApRep PDU
         try
         {
-            kerberosDecoder.decode( stream, apRepContainer );
+            Asn1Decoder.decode( stream, apRepContainer );
         }
         catch ( DecoderException de )
         {
@@ -542,12 +518,10 @@ public class KerberosDecoder
         // Allocate a ApReq Container
         Asn1Container apReqContainer = new ApReqContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the ApReq PDU
         try
         {
-            kerberosDecoder.decode( stream, apReqContainer );
+            Asn1Decoder.decode( stream, apReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -575,12 +549,10 @@ public class KerberosDecoder
         // Allocate a KrbPriv Container
         Asn1Container krbPrivContainer = new KrbPrivContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the KrbPriv PDU
         try
         {
-            kerberosDecoder.decode( stream, krbPrivContainer );
+            Asn1Decoder.decode( stream, krbPrivContainer );
         }
         catch ( DecoderException de )
         {
@@ -608,12 +580,10 @@ public class KerberosDecoder
         // Allocate a EncAsRepPart Container
         Asn1Container encAsRepPartContainer = new EncAsRepPartContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the EncAsRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encAsRepPartContainer );
+            Asn1Decoder.decode( stream, encAsRepPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -641,12 +611,10 @@ public class KerberosDecoder
         // Allocate a EncTgsRepPart Container
         Asn1Container encTgsRepPartContainer = new EncTgsRepPartContainer( stream );
 
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         // Decode the EncTgsRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encTgsRepPartContainer );
+            Asn1Decoder.decode( stream, encTgsRepPartContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageGrammar.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageGrammar.java
index d283562..bc07fcd 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageGrammar.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageGrammar.java
@@ -64,8 +64,6 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
     /** The instance of grammar. KerberosMessageGrammar is a singleton */
     private static Grammar<KerberosMessageContainer> instance = new KerberosMessageGrammar();
 
-    Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
     private class DecodeKerberosMessage extends GrammarAction<KerberosMessageContainer>
     {
         public void action( KerberosMessageContainer kerberosMessageContainer ) throws DecoderException
@@ -91,7 +89,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     AsReqContainer asReqContainer = new AsReqContainer( stream );
 
                     // Decode the AS_REQ PDU
-                    kerberosDecoder.decode( stream, asReqContainer );
+                    Asn1Decoder.decode( stream, asReqContainer );
 
                     KerberosMessage asReq = asReqContainer.getAsReq();
                     kerberosMessageContainer.setMessage( asReq );
@@ -102,7 +100,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     AsRepContainer asRepContainer = new AsRepContainer( stream );
 
                     // Decode the AS-REP PDU
-                    kerberosDecoder.decode( stream, asRepContainer );
+                    Asn1Decoder.decode( stream, asRepContainer );
 
                     KerberosMessage asRep = asRepContainer.getAsRep();
                     kerberosMessageContainer.setMessage( asRep );
@@ -113,7 +111,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     TgsReqContainer tgsReqContainer = new TgsReqContainer( stream );
 
                     // Decode the TGS-REQ PDU
-                    kerberosDecoder.decode( stream, tgsReqContainer );
+                    Asn1Decoder.decode( stream, tgsReqContainer );
 
                     KerberosMessage tgsReq = tgsReqContainer.getTgsReq();
                     kerberosMessageContainer.setMessage( tgsReq );
@@ -124,7 +122,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     TgsRepContainer tgsRepContainer = new TgsRepContainer( stream );
 
                     // Decode the TGS-REP PDU
-                    kerberosDecoder.decode( stream, tgsRepContainer );
+                    Asn1Decoder.decode( stream, tgsRepContainer );
 
                     KerberosMessage tgsRep = tgsRepContainer.getTgsRep();
                     kerberosMessageContainer.setMessage( tgsRep );
@@ -135,7 +133,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     ApReqContainer apReqContainer = new ApReqContainer( stream );
 
                     // Decode the AP-REQ PDU
-                    kerberosDecoder.decode( stream, apReqContainer );
+                    Asn1Decoder.decode( stream, apReqContainer );
 
                     KerberosMessage apReq = apReqContainer.getApReq();
                     kerberosMessageContainer.setMessage( apReq );
@@ -145,7 +143,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     ApRepContainer apRepContainer = new ApRepContainer( stream );
 
                     // Decode the AP-REP PDU
-                    kerberosDecoder.decode( stream, apRepContainer );
+                    Asn1Decoder.decode( stream, apRepContainer );
 
                     KerberosMessage apRep = apRepContainer.getApRep();
                     kerberosMessageContainer.setMessage( apRep );
@@ -155,7 +153,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     KrbSafeContainer krbSafeContainer = new KrbSafeContainer( stream );
 
                     // Decode the KRB-SAFE PDU
-                    kerberosDecoder.decode( stream, krbSafeContainer );
+                    Asn1Decoder.decode( stream, krbSafeContainer );
 
                     KerberosMessage krbSafe = krbSafeContainer.getKrbSafe();
                     kerberosMessageContainer.setMessage( krbSafe );
@@ -165,7 +163,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     KrbPrivContainer krbPrivContainer = new KrbPrivContainer( stream );
 
                     // Decode the KRB-PRIV PDU
-                    kerberosDecoder.decode( stream, krbPrivContainer );
+                    Asn1Decoder.decode( stream, krbPrivContainer );
 
                     KerberosMessage krbPriv = krbPrivContainer.getKrbPriv();
                     kerberosMessageContainer.setMessage( krbPriv );
@@ -175,7 +173,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     KrbCredContainer krbCredContainer = new KrbCredContainer( stream );
 
                     // Decode the KRB-CRED PDU
-                    kerberosDecoder.decode( stream, krbCredContainer );
+                    Asn1Decoder.decode( stream, krbCredContainer );
 
                     KerberosMessage krbCred = krbCredContainer.getKrbCred();
                     kerberosMessageContainer.setMessage( krbCred );
@@ -185,7 +183,7 @@ public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessag
                     KrbErrorContainer krbErrorContainer = new KrbErrorContainer( stream );
 
                     // Decode the KRB-ERROR PDU
-                    kerberosDecoder.decode( stream, krbErrorContainer );
+                    Asn1Decoder.decode( stream, krbErrorContainer );
 
                     KerberosMessage krbError = krbErrorContainer.getKrbError();
                     kerberosMessageContainer.setMessage( krbError );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadAuthorizationData.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadAuthorizationData.java
index 3ab2eb0..37d8269 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadAuthorizationData.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadAuthorizationData.java
@@ -81,12 +81,10 @@ public abstract class AbstractReadAuthorizationData<E extends Asn1Container> ext
         }
 
         // Now, let's decode the AuthorizationData
-        Asn1Decoder authorizationDataDecoder = new Asn1Decoder();
-
         AuthorizationDataContainer authorizationDataContainer = new AuthorizationDataContainer();
 
         // Decode the AuthorizationData PDU
-        authorizationDataDecoder.decode( container.getStream(), authorizationDataContainer );
+        Asn1Decoder.decode( container.getStream(), authorizationDataContainer );
 
         AuthorizationData authorizationData = authorizationDataContainer.getAuthorizationData();
 
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadCheckSum.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadCheckSum.java
index fc1b4aa..f9d7753 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadCheckSum.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadCheckSum.java
@@ -81,12 +81,10 @@ public abstract class AbstractReadCheckSum<E extends Asn1Container> extends Gram
         }
 
         // Now, let's decode the Checksum
-        Asn1Decoder checksumDecoder = new Asn1Decoder();
-
         ChecksumContainer checksumContainer = new ChecksumContainer();
 
         // Decode the Checksum PDU
-        checksumDecoder.decode( container.getStream(), checksumContainer );
+        Asn1Decoder.decode( container.getStream(), checksumContainer );
 
         Checksum checksum = checksumContainer.getChecksum();
 
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptedPart.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptedPart.java
index cca1f38..efb6dd6 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptedPart.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptedPart.java
@@ -82,13 +82,11 @@ public abstract class AbstractReadEncryptedPart<E extends Asn1Container> extends
         }
 
         // Now, let's decode the PrincipalName
-        Asn1Decoder encryptedDataDecoder = new Asn1Decoder();
-
         EncryptedDataContainer encryptedDataContainer = new EncryptedDataContainer();
         encryptedDataContainer.setStream( container.getStream() );
 
         // Decode the Ticket PDU
-        encryptedDataDecoder.decode( container.getStream(), encryptedDataContainer );
+        Asn1Decoder.decode( container.getStream(), encryptedDataContainer );
 
         EncryptedData encryptedData = encryptedDataContainer.getEncryptedData();
 
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptionKey.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptionKey.java
index 0c138e1..f19bbae 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptionKey.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptionKey.java
@@ -81,12 +81,10 @@ public abstract class AbstractReadEncryptionKey<E extends Asn1Container> extends
         }
 
         // Now, let's decode the EncryptionKey
-        Asn1Decoder encryptionKeyDecoder = new Asn1Decoder();
-
         EncryptionKeyContainer encryptionKeyContainer = new EncryptionKeyContainer();
 
         // Decode the EncryptionKey PDU
-        encryptionKeyDecoder.decode( container.getStream(), encryptionKeyContainer );
+        Asn1Decoder.decode( container.getStream(), encryptionKeyContainer );
 
         EncryptionKey encryptionKey = encryptionKeyContainer.getEncryptionKey();
 
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadHostAddress.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadHostAddress.java
index 3746091..32e1ca7 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadHostAddress.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadHostAddress.java
@@ -75,15 +75,13 @@ public abstract class AbstractReadHostAddress<E extends Asn1Container> extends G
         }
 
         // Now, let's decode the HostAddress
-        Asn1Decoder hostAddressDecoder = new Asn1Decoder();
-
         HostAddressContainer hostAddressContainer = new HostAddressContainer();
 
         // Passes the Stream to the decoder
         hostAddressContainer.setStream( container.getStream() );
 
         // Decode the HostAddress PDU
-        hostAddressDecoder.decode( container.getStream(), hostAddressContainer );
+        Asn1Decoder.decode( container.getStream(), hostAddressContainer );
 
         // Store the HostAddress in the container
         HostAddress hostAddress = hostAddressContainer.getHostAddress();
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadHostAddresses.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadHostAddresses.java
index 1308aae..fab262a 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadHostAddresses.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadHostAddresses.java
@@ -81,15 +81,13 @@ public abstract class AbstractReadHostAddresses<E extends Asn1Container> extends
         }
 
         // Now, let's decode the HostAddresses
-        Asn1Decoder hostAddressesDecoder = new Asn1Decoder();
-
         HostAddressesContainer hostAddressesContainer = new HostAddressesContainer();
 
         // Passes the Stream to the decoder
         hostAddressesContainer.setStream( container.getStream() );
 
         // Decode the HostAddresses PDU
-        hostAddressesDecoder.decode( container.getStream(), hostAddressesContainer );
+        Asn1Decoder.decode( container.getStream(), hostAddressesContainer );
 
         // Store the HostAddresses in the container
         HostAddresses hostAddresses = hostAddressesContainer.getHostAddresses();
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadPrincipalName.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadPrincipalName.java
index 93a8d98..5d8a58a 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadPrincipalName.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadPrincipalName.java
@@ -81,12 +81,10 @@ public abstract class AbstractReadPrincipalName<E extends Asn1Container> extends
         }
 
         // Now, let's decode the PrincipalName
-        Asn1Decoder principalNameDecoder = new Asn1Decoder();
-
         PrincipalNameContainer principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        principalNameDecoder.decode( container.getStream(), principalNameContainer );
+        Asn1Decoder.decode( container.getStream(), principalNameContainer );
 
         PrincipalName principalName = principalNameContainer.getPrincipalName();
 
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/apReq/actions/StoreTicket.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/apReq/actions/StoreTicket.java
index c76abfd..45d4da5 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/apReq/actions/StoreTicket.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/apReq/actions/StoreTicket.java
@@ -73,12 +73,10 @@ public class StoreTicket extends GrammarAction<ApReqContainer>
         }
 
         // Now, let's decode the Ticket
-        Asn1Decoder ticketDecoder = new Asn1Decoder();
-
         TicketContainer ticketContainer = new TicketContainer( apReqContainer.getStream() );
 
         // Decode the Ticket PDU
-        ticketDecoder.decode( apReqContainer.getStream(), ticketContainer );
+        Asn1Decoder.decode( apReqContainer.getStream(), ticketContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/asRep/actions/StoreKdcRep.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/asRep/actions/StoreKdcRep.java
index ba8b678..5625c9b 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/asRep/actions/StoreKdcRep.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/asRep/actions/StoreKdcRep.java
@@ -73,8 +73,6 @@ public class StoreKdcRep extends GrammarAction<AsRepContainer>
         }
 
         // Now, let's decode the KDC-REP
-        Asn1Decoder kdcRepDecoder = new Asn1Decoder();
-
         KdcRepContainer kdcRepContainer = new KdcRepContainer( asRepContainer.getStream() );
 
         // Store the created AS-REP object into the KDC-REP container
@@ -82,7 +80,7 @@ public class StoreKdcRep extends GrammarAction<AsRepContainer>
         kdcRepContainer.setKdcRep( asRep );
 
         // Decode the KDC_REP PDU
-        kdcRepDecoder.decode( asRepContainer.getStream(), kdcRepContainer );
+        Asn1Decoder.decode( asRepContainer.getStream(), kdcRepContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/asReq/actions/StoreKdcReq.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/asReq/actions/StoreKdcReq.java
index 3e59db0..6715a3e 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/asReq/actions/StoreKdcReq.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/asReq/actions/StoreKdcReq.java
@@ -73,8 +73,6 @@ public class StoreKdcReq extends GrammarAction<AsReqContainer>
         }
 
         // Now, let's decode the KDC-REQ
-        Asn1Decoder kdcReqDecoder = new Asn1Decoder();
-
         KdcReqContainer kdcReqContainer = new KdcReqContainer( asReqContainer.getStream() );
 
         // Store the created AS-REQ object into the KDC-REQ container
@@ -82,7 +80,7 @@ public class StoreKdcReq extends GrammarAction<AsReqContainer>
         kdcReqContainer.setKdcReq( asReq );
 
         // Decode the KDC_REQ PDU
-        kdcReqDecoder.decode( asReqContainer.getStream(), kdcReqContainer );
+        Asn1Decoder.decode( asReqContainer.getStream(), kdcReqContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encAsRepPart/actions/StoreEncAsRepPart.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encAsRepPart/actions/StoreEncAsRepPart.java
index 7d6172f..9df34df 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encAsRepPart/actions/StoreEncAsRepPart.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encAsRepPart/actions/StoreEncAsRepPart.java
@@ -72,14 +72,12 @@ public class StoreEncAsRepPart extends GrammarAction<EncAsRepPartContainer>
         }
 
         // Now, let's decode the EncKdcRepPart
-        Asn1Decoder encKdcRepPartDecoder = new Asn1Decoder();
-
         EncKdcRepPartContainer encKdcRepPartContainer = new EncKdcRepPartContainer( encAsRepPartContainer.getStream() );
 
         // Decode the EncKdcRepPart PDU
         try
         {
-            encKdcRepPartDecoder.decode( encAsRepPartContainer.getStream(), encKdcRepPartContainer );
+            Asn1Decoder.decode( encAsRepPartContainer.getStream(), encKdcRepPartContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTicketInfo.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTicketInfo.java
index 3d1c94a..18beae3 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTicketInfo.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTicketInfo.java
@@ -64,8 +64,6 @@ public class StoreTicketInfo extends GrammarAction<EncKrbCredPartContainer>
         }
 
         // decoder for KrbCredInfo
-        Asn1Decoder decoder = new Asn1Decoder();
-
         // KrbCredInfo container
         KrbCredInfoContainer ticketInfoContainer = new KrbCredInfoContainer();
         ticketInfoContainer.setStream( encKrbCredPartContainer.getStream() );
@@ -73,7 +71,7 @@ public class StoreTicketInfo extends GrammarAction<EncKrbCredPartContainer>
         encKrbCredPartContainer.rewind();
 
         // decode KrbCredInfo
-        decoder.decode( encKrbCredPartContainer.getStream(), ticketInfoContainer );
+        Asn1Decoder.decode( encKrbCredPartContainer.getStream(), ticketInfoContainer );
 
         KrbCredInfo ticketInfo = ticketInfoContainer.getKrbCredInfo();
         // add KrbCredInfo to the list of ticket-info
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTgsRepPart/actions/StoreEncTgsRepPart.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTgsRepPart/actions/StoreEncTgsRepPart.java
index d20f4de..175f6c6 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTgsRepPart/actions/StoreEncTgsRepPart.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTgsRepPart/actions/StoreEncTgsRepPart.java
@@ -72,12 +72,10 @@ public class StoreEncTgsRepPart extends GrammarAction<EncTgsRepPartContainer>
         }
 
         // Now, let's decode the EncKdcRepPart
-        Asn1Decoder encKdcRepPartDecoder = new Asn1Decoder();
-
         EncKdcRepPartContainer encKdcRepPartContainer = new EncKdcRepPartContainer( encTgsRepPartContainer.getStream() );
 
         // Decode the EncKdcRepPart PDU
-        encKdcRepPartDecoder.decode( encTgsRepPartContainer.getStream(), encKdcRepPartContainer );
+        Asn1Decoder.decode( encTgsRepPartContainer.getStream(), encKdcRepPartContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreTransited.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreTransited.java
index 8159a8e..dc80989 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreTransited.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreTransited.java
@@ -75,9 +75,7 @@ public class StoreTransited extends GrammarAction<EncTicketPartContainer>
         TransitedEncodingContainer transitedContainer = new TransitedEncodingContainer();
 
         // Now, let's decode the TransitedEncoding
-        Asn1Decoder transitedEncodingDecoder = new Asn1Decoder();
-
-        transitedEncodingDecoder.decode( encTicketPartContainer.getStream(), transitedContainer );
+        Asn1Decoder.decode( encTicketPartContainer.getStream(), transitedContainer );
 
         TransitedEncoding te = transitedContainer.getTransitedEncoding();
 
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo/actions/AddETypeInfoEntry.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo/actions/AddETypeInfoEntry.java
index f7b8333..502171f 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo/actions/AddETypeInfoEntry.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo/actions/AddETypeInfoEntry.java
@@ -72,8 +72,6 @@ public class AddETypeInfoEntry extends GrammarAction<ETypeInfoContainer>
         }
 
         // Now, let's decode the ETYPE-INFO-ENTRY
-        Asn1Decoder etypeInfoEntryDecoder = new Asn1Decoder();
-
         ETypeInfoEntryContainer etypeInfoEntryContainer = new ETypeInfoEntryContainer();
         etypeInfoEntryContainer.setStream( eTypeInfoContainer.getStream() );
 
@@ -82,7 +80,7 @@ public class AddETypeInfoEntry extends GrammarAction<ETypeInfoContainer>
         eTypeInfoContainer.rewind();
 
         // Decode the ETypeInfoEntry PDU
-        etypeInfoEntryDecoder.decode( eTypeInfoContainer.getStream(), etypeInfoEntryContainer );
+        Asn1Decoder.decode( eTypeInfoContainer.getStream(), etypeInfoEntryContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2/actions/AddETypeInfo2Entry.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2/actions/AddETypeInfo2Entry.java
index 90d6ce1..3c92a60 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2/actions/AddETypeInfo2Entry.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2/actions/AddETypeInfo2Entry.java
@@ -72,8 +72,6 @@ public class AddETypeInfo2Entry extends GrammarAction<ETypeInfo2Container>
         }
 
         // Now, let's decode the ETYPE-INFO2-ENTRY
-        Asn1Decoder etypeInfo2EntryDecoder = new Asn1Decoder();
-
         ETypeInfo2EntryContainer etypeInfo2EntryContainer = new ETypeInfo2EntryContainer();
         etypeInfo2EntryContainer.setStream( eTypeInfo2Container.getStream() );
 
@@ -82,7 +80,7 @@ public class AddETypeInfo2Entry extends GrammarAction<ETypeInfo2Container>
         eTypeInfo2Container.rewind();
 
         // Decode the ETypeInfo2Entry PDU
-        etypeInfo2EntryDecoder.decode( eTypeInfo2Container.getStream(), etypeInfo2EntryContainer );
+        Asn1Decoder.decode( eTypeInfo2Container.getStream(), etypeInfo2EntryContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddresses/actions/AddHostAddress.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddresses/actions/AddHostAddress.java
index 90eb1be..00d4153 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddresses/actions/AddHostAddress.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddresses/actions/AddHostAddress.java
@@ -72,8 +72,6 @@ public class AddHostAddress extends GrammarAction<HostAddressesContainer>
         }
 
         // Now, let's decode the HostAddress
-        Asn1Decoder hostAddressDecoder = new Asn1Decoder();
-
         HostAddressContainer hostAddressContainer = new HostAddressContainer();
         hostAddressContainer.setStream( hostAddressesContainer.getStream() );
 
@@ -82,7 +80,7 @@ public class AddHostAddress extends GrammarAction<HostAddressesContainer>
         hostAddressesContainer.rewind();
 
         // Decode the HostAddress PDU
-        hostAddressDecoder.decode( hostAddressesContainer.getStream(), hostAddressContainer );
+        Asn1Decoder.decode( hostAddressesContainer.getStream(), hostAddressContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/AddPaData.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/AddPaData.java
index 6ec5010..56fd9e9 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/AddPaData.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/AddPaData.java
@@ -73,8 +73,6 @@ public class AddPaData extends GrammarAction<KdcRepContainer>
         }
 
         // Now, let's decode the PA-DATA
-        Asn1Decoder paDataDecoder = new Asn1Decoder();
-
         PaDataContainer paDataContainer = new PaDataContainer();
         paDataContainer.setStream( kdcRepContainer.getStream() );
 
@@ -82,7 +80,7 @@ public class AddPaData extends GrammarAction<KdcRepContainer>
         kdcRepContainer.rewind();
 
         // Decode the PA-DATA PDU
-        paDataDecoder.decode( kdcRepContainer.getStream(), paDataContainer );
+        Asn1Decoder.decode( kdcRepContainer.getStream(), paDataContainer );
 
         // Update the parent
         kdcRepContainer.updateParent();
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreTicket.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreTicket.java
index e804bde..e2a2c05 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreTicket.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreTicket.java
@@ -73,12 +73,10 @@ public class StoreTicket extends GrammarAction<KdcRepContainer>
         }
 
         // Now, let's decode the Ticket
-        Asn1Decoder ticketDecoder = new Asn1Decoder();
-
         TicketContainer ticketContainer = new TicketContainer( kdcRepContainer.getStream() );
 
         // Decode the Ticket PDU
-        ticketDecoder.decode( kdcRepContainer.getStream(), ticketContainer );
+        Asn1Decoder.decode( kdcRepContainer.getStream(), ticketContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReq/actions/AddPaData.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReq/actions/AddPaData.java
index d461524..2e0601f 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReq/actions/AddPaData.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReq/actions/AddPaData.java
@@ -73,8 +73,6 @@ public class AddPaData extends GrammarAction<KdcReqContainer>
         }
 
         // Now, let's decode the PA-DATA
-        Asn1Decoder paDataDecoder = new Asn1Decoder();
-
         PaDataContainer paDataContainer = new PaDataContainer();
         paDataContainer.setStream( kdcReqContainer.getStream() );
 
@@ -82,7 +80,7 @@ public class AddPaData extends GrammarAction<KdcReqContainer>
         kdcReqContainer.rewind();
 
         // Decode the PA-DATA PDU
-        paDataDecoder.decode( kdcReqContainer.getStream(), paDataContainer );
+        Asn1Decoder.decode( kdcReqContainer.getStream(), paDataContainer );
 
         // Update the parent
         kdcReqContainer.updateParent();
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReq/actions/StoreKdcReqBody.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReq/actions/StoreKdcReqBody.java
index a59fe04..7d4227d 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReq/actions/StoreKdcReqBody.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReq/actions/StoreKdcReqBody.java
@@ -73,12 +73,10 @@ public class StoreKdcReqBody extends GrammarAction<KdcReqContainer>
         }
 
         // Now, let's decode the KDC-REQ-BODY
-        Asn1Decoder kdcReqBodyDecoder = new Asn1Decoder();
-
         KdcReqBodyContainer kdcReqBodyContainer = new KdcReqBodyContainer( kdcReqContainer.getStream() );
 
         // Decode the KDC-REQ-BODY PDU
-        kdcReqBodyDecoder.decode( kdcReqContainer.getStream(), kdcReqBodyContainer );
+        Asn1Decoder.decode( kdcReqContainer.getStream(), kdcReqBodyContainer );
 
         // Store the KDC-REQ-BODY in the container
         KdcReqBody kdcReqBody = kdcReqBodyContainer.getKdcReqBody();
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/AddTicket.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/AddTicket.java
index 7064d2c..f0d03ac 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/AddTicket.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/AddTicket.java
@@ -73,15 +73,13 @@ public class AddTicket extends GrammarAction<KdcReqBodyContainer>
         }
 
         // Now, let's decode the Ticket
-        Asn1Decoder ticketDecoder = new Asn1Decoder();
-
         TicketContainer ticketContainer = new TicketContainer( kdcReqBodyContainer.getStream() );
 
         // We have to move back to the Ticket tag
         kdcReqBodyContainer.rewind();
 
         // Decode the Ticket PDU
-        ticketDecoder.decode( kdcReqBodyContainer.getStream(), ticketContainer );
+        Asn1Decoder.decode( kdcReqBodyContainer.getStream(), ticketContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreTickets.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreTickets.java
index 1a43e21..778afea 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreTickets.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreTickets.java
@@ -64,15 +64,13 @@ public class StoreTickets extends GrammarAction<KrbCredContainer>
         }
 
         // decoder for Ticket
-        Asn1Decoder decoder = new Asn1Decoder();
-
         // Ticket container
         TicketContainer ticketContainer = new TicketContainer( krbCredContainer.getStream() );
 
         krbCredContainer.rewind();
 
         // decode Ticket
-        decoder.decode( krbCredContainer.getStream(), ticketContainer );
+        Asn1Decoder.decode( krbCredContainer.getStream(), ticketContainer );
 
         Ticket ticket = ticketContainer.getTicket();
         // add Ticket to the list of tickets
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbSafe/actions/StoreSafeBody.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbSafe/actions/StoreSafeBody.java
index c8be548..6f2a7fa 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbSafe/actions/StoreSafeBody.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbSafe/actions/StoreSafeBody.java
@@ -72,15 +72,13 @@ public class StoreSafeBody extends GrammarAction<KrbSafeContainer>
         }
 
         // Now, let's decode the HostAddress
-        Asn1Decoder krbSafeBodyDecoder = new Asn1Decoder();
-
         KrbSafeBodyContainer krbSafeBodyContainer = new KrbSafeBodyContainer();
 
         // Passes the Stream to the decoder
         krbSafeBodyContainer.setStream( krbSafeContainer.getStream() );
 
         // Decode the KrbSafeBody PDU
-        krbSafeBodyDecoder.decode( krbSafeContainer.getStream(), krbSafeBodyContainer );
+        Asn1Decoder.decode( krbSafeContainer.getStream(), krbSafeBodyContainer );
 
         // Store the KrbSafeBody in the container
         KrbSafeBody krbSafeBody = krbSafeBodyContainer.getKrbSafeBody();
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/methodData/actions/AddPaData.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/methodData/actions/AddPaData.java
index fe72e3a..3b85197 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/methodData/actions/AddPaData.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/methodData/actions/AddPaData.java
@@ -72,8 +72,6 @@ public class AddPaData extends GrammarAction<MethodDataContainer>
         }
 
         // Now, let's decode the PA-DATA
-        Asn1Decoder paDataDecoder = new Asn1Decoder();
-
         PaDataContainer paDataContainer = new PaDataContainer();
         paDataContainer.setStream( methodDataContainer.getStream() );
 
@@ -82,7 +80,7 @@ public class AddPaData extends GrammarAction<MethodDataContainer>
         methodDataContainer.rewind();
 
         // Decode the PA-DATA PDU
-        paDataDecoder.decode( methodDataContainer.getStream(), paDataContainer );
+        Asn1Decoder.decode( methodDataContainer.getStream(), paDataContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/tgsRep/actions/StoreKdcRep.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/tgsRep/actions/StoreKdcRep.java
index c5770a5..c10d1e9 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/tgsRep/actions/StoreKdcRep.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/tgsRep/actions/StoreKdcRep.java
@@ -73,8 +73,6 @@ public class StoreKdcRep extends GrammarAction<TgsRepContainer>
         }
 
         // Now, let's decode the KDC-REP
-        Asn1Decoder kdcRepDecoder = new Asn1Decoder();
-
         KdcRepContainer kdcRepContainer = new KdcRepContainer( tgsRepContainer.getStream() );
 
         // Store the created TGS-REP object into the KDC-REP container
@@ -82,7 +80,7 @@ public class StoreKdcRep extends GrammarAction<TgsRepContainer>
         kdcRepContainer.setKdcRep( tgsRep );
 
         // Decode the KDC_REP PDU
-        kdcRepDecoder.decode( tgsRepContainer.getStream(), kdcRepContainer );
+        Asn1Decoder.decode( tgsRepContainer.getStream(), kdcRepContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/tgsReq/actions/StoreKdcReq.java b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/tgsReq/actions/StoreKdcReq.java
index aa00344..b16d0a0 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/tgsReq/actions/StoreKdcReq.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/tgsReq/actions/StoreKdcReq.java
@@ -73,8 +73,6 @@ public class StoreKdcReq extends GrammarAction<TgsReqContainer>
         }
 
         // Now, let's decode the KDC-REQ
-        Asn1Decoder kdcReqDecoder = new Asn1Decoder();
-
         KdcReqContainer kdcReqContainer = new KdcReqContainer( tgsReqContainer.getStream() );
 
         // Store the created TGS-REQ object into the KDC-REQ container
@@ -82,7 +80,7 @@ public class StoreKdcReq extends GrammarAction<TgsReqContainer>
         kdcReqContainer.setKdcReq( tgsReq );
 
         // Decode the KDC_REQ PDU
-        kdcReqDecoder.decode( tgsReqContainer.getStream(), kdcReqContainer );
+        Asn1Decoder.decode( tgsReqContainer.getStream(), kdcReqContainer );
 
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdAndOrDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdAndOrDecoderTest.java
index c1a9832..8075da6 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdAndOrDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdAndOrDecoderTest.java
@@ -45,8 +45,6 @@ public class AdAndOrDecoderTest
     @Test
     public void testDecodeFullAdAndOr()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x2D );
 
         stream.put( new byte[]
@@ -104,7 +102,7 @@ public class AdAndOrDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, adAndOrContainer );
+            Asn1Decoder.decode( stream, adAndOrContainer );
         }
         catch ( DecoderException de )
         {
@@ -138,8 +136,6 @@ public class AdAndOrDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrWithEmptySeq() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 2 );
 
         stream.put( new byte[]
@@ -152,7 +148,7 @@ public class AdAndOrDecoderTest
         AdAndOrContainer adAndOrContainer = new AdAndOrContainer();
         adAndOrContainer.setStream( stream );
 
-        krbDecoder.decode( stream, adAndOrContainer );
+        Asn1Decoder.decode( stream, adAndOrContainer );
         fail();
     }
 
@@ -160,8 +156,6 @@ public class AdAndOrDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrEmptyConditionCount() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 4 );
 
         stream.put( new byte[]
@@ -175,7 +169,7 @@ public class AdAndOrDecoderTest
         AdAndOrContainer adAndOrContainer = new AdAndOrContainer();
         adAndOrContainer.setStream( stream );
 
-        krbDecoder.decode( stream, adAndOrContainer );
+        Asn1Decoder.decode( stream, adAndOrContainer );
         fail();
     }
 
@@ -183,8 +177,6 @@ public class AdAndOrDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrNullConditionCount() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 6 );
 
         stream.put( new byte[]
@@ -199,7 +191,7 @@ public class AdAndOrDecoderTest
         AdAndOrContainer adAndOrContainer = new AdAndOrContainer();
         adAndOrContainer.setStream( stream );
 
-        krbDecoder.decode( stream, adAndOrContainer );
+        Asn1Decoder.decode( stream, adAndOrContainer );
         fail();
     }
 
@@ -207,8 +199,6 @@ public class AdAndOrDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrNoConditionCount() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x28 );
 
         stream.put( new byte[]
@@ -258,7 +248,7 @@ public class AdAndOrDecoderTest
         AdAndOrContainer adAndOrContainer = new AdAndOrContainer();
         adAndOrContainer.setStream( stream );
 
-        krbDecoder.decode( stream, adAndOrContainer );
+        Asn1Decoder.decode( stream, adAndOrContainer );
         fail();
     }
 
@@ -266,8 +256,6 @@ public class AdAndOrDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrNoElements() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
         stream.put( new byte[]
@@ -284,7 +272,7 @@ public class AdAndOrDecoderTest
         AdAndOrContainer adAndOrContainer = new AdAndOrContainer();
         adAndOrContainer.setStream( stream );
 
-        krbDecoder.decode( stream, adAndOrContainer );
+        Asn1Decoder.decode( stream, adAndOrContainer );
         fail();
     }
 
@@ -292,8 +280,6 @@ public class AdAndOrDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrEmptyElements() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
         stream.put( new byte[]
@@ -311,7 +297,7 @@ public class AdAndOrDecoderTest
 
         AdAndOrContainer adAndOrContainer = new AdAndOrContainer();
 
-        krbDecoder.decode( stream, adAndOrContainer );
+        Asn1Decoder.decode( stream, adAndOrContainer );
         fail();
     }
 
@@ -319,8 +305,6 @@ public class AdAndOrDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrNullElements() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
         stream.put( new byte[]
@@ -341,7 +325,7 @@ public class AdAndOrDecoderTest
         AdAndOrContainer adAndOrContainer = new AdAndOrContainer();
         adAndOrContainer.setStream( stream );
 
-        krbDecoder.decode( stream, adAndOrContainer );
+        Asn1Decoder.decode( stream, adAndOrContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdIfRelevantDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdIfRelevantDecoderTest.java
index 3230015..4708a46 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdIfRelevantDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdIfRelevantDecoderTest.java
@@ -51,8 +51,6 @@ public class AdIfRelevantDecoderTest
     @Test
     public void testAdIfRelevant()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x24 );
 
         stream.put( new byte[]
@@ -100,7 +98,7 @@ public class AdIfRelevantDecoderTest
         // Decode the AdIfRelevant PDU
         try
         {
-            kerberosDecoder.decode( stream, adIfRelevantContainer );
+            Asn1Decoder.decode( stream, adIfRelevantContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdKdcIssuedDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdKdcIssuedDecoderTest.java
index ad024ba..b5da36d 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdKdcIssuedDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdKdcIssuedDecoderTest.java
@@ -64,8 +64,6 @@ public class AdKdcIssuedDecoderTest
     @Test
     public void testDecodeAdKdcIssued()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x60 );
 
         stream.put( new byte[]
@@ -174,7 +172,7 @@ public class AdKdcIssuedDecoderTest
         // Decode the AdKdcIssued PDU
         try
         {
-            kerberosDecoder.decode( stream, adKdcIssuedContainer );
+            Asn1Decoder.decode( stream, adKdcIssuedContainer );
         }
         catch ( DecoderException de )
         {
@@ -241,8 +239,6 @@ public class AdKdcIssuedDecoderTest
     @Test
     public void testDecodeAdKdcIssuedNoOptionalFields()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x3B );
 
         stream.put( new byte[]
@@ -314,7 +310,7 @@ public class AdKdcIssuedDecoderTest
         // Decode the AdKdcIssued PDU
         try
         {
-            kerberosDecoder.decode( stream, adKdcIssuedContainer );
+            Asn1Decoder.decode( stream, adKdcIssuedContainer );
         }
         catch ( DecoderException de )
         {
@@ -381,8 +377,6 @@ public class AdKdcIssuedDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmpty() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
         stream.put( new byte[]
@@ -395,6 +389,6 @@ public class AdKdcIssuedDecoderTest
         adKdcIssuedContainer.setStream( stream );
 
         // Decode the AdKDCIssued PDU
-        kerberosDecoder.decode( stream, adKdcIssuedContainer );
+        Asn1Decoder.decode( stream, adKdcIssuedContainer );
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdMandatoryForKdcDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdMandatoryForKdcDecoderTest.java
index 977c211..34f6230 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdMandatoryForKdcDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdMandatoryForKdcDecoderTest.java
@@ -51,8 +51,6 @@ public class AdMandatoryForKdcDecoderTest
     @Test
     public void testAdMandatoryForKdc()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x24 );
 
         stream.put( new byte[]
@@ -100,7 +98,7 @@ public class AdMandatoryForKdcDecoderTest
         // Decode the AdMandatoryForKdc PDU
         try
         {
-            kerberosDecoder.decode( stream, adMandatoryForKdcContainer );
+            Asn1Decoder.decode( stream, adMandatoryForKdcContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java
index fe4c011..e1e1057 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java
@@ -52,7 +52,6 @@ public class ApRepDecoderTest
     @Test
     public void testDecodeFullApRep() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x21 );
 
@@ -98,7 +97,7 @@ public class ApRepDecoderTest
         // Decode the ApRep PDU
         try
         {
-            kerberosDecoder.decode( stream, apRepContainer );
+            Asn1Decoder.decode( stream, apRepContainer );
         }
         catch ( DecoderException de )
         {
@@ -136,7 +135,6 @@ public class ApRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeFullApRepWrongMsgType() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x21 );
 
@@ -180,7 +178,7 @@ public class ApRepDecoderTest
         ApRepContainer apRepContainer = new ApRepContainer( stream );
 
         // Decode the ApRep PDU
-        kerberosDecoder.decode( stream, apRepContainer );
+        Asn1Decoder.decode( stream, apRepContainer );
         fail();
     }
 
@@ -191,7 +189,6 @@ public class ApRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testApRepEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -204,7 +201,7 @@ public class ApRepDecoderTest
         Asn1Container apRepContainer = new ApRepContainer( stream );
 
         // Decode the AP-REP PDU
-        kerberosDecoder.decode( stream, apRepContainer );
+        Asn1Decoder.decode( stream, apRepContainer );
         fail();
     }
 
@@ -215,7 +212,6 @@ public class ApRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testApRepEmptSEQ() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -231,7 +227,7 @@ public class ApRepDecoderTest
         Asn1Container apRepContainer = new ApRepContainer( stream );
 
         // Decode the AP-REP PDU
-        kerberosDecoder.decode( stream, apRepContainer );
+        Asn1Decoder.decode( stream, apRepContainer );
         fail();
     }
 
@@ -242,7 +238,6 @@ public class ApRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testApRepEmptyPvnoTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -259,7 +254,7 @@ public class ApRepDecoderTest
         Asn1Container apRepContainer = new ApRepContainer( stream );
 
         // Decode the AP-REP PDU
-        kerberosDecoder.decode( stream, apRepContainer );
+        Asn1Decoder.decode( stream, apRepContainer );
         fail();
     }
 
@@ -270,7 +265,6 @@ public class ApRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testAsRepEmptyPvnoValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x08 );
 
@@ -288,7 +282,7 @@ public class ApRepDecoderTest
         Asn1Container apRepContainer = new ApRepContainer( stream );
 
         // Decode the AP-REP PDU
-        kerberosDecoder.decode( stream, apRepContainer );
+        Asn1Decoder.decode( stream, apRepContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java
index 5a5fd01..ace1ec7 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java
@@ -54,7 +54,6 @@ public class ApReqDecoderTest
     @Test
     public void testDecodeFullApReq() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x6C );
 
@@ -175,7 +174,7 @@ public class ApReqDecoderTest
         // Decode the ApReq PDU
         try
         {
-            kerberosDecoder.decode( stream, apReqContainer );
+            Asn1Decoder.decode( stream, apReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -215,7 +214,6 @@ public class ApReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeFullApReqBadMsgType() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x193 );
 
@@ -334,7 +332,7 @@ public class ApReqDecoderTest
         ApReqContainer apReqContainer = new ApReqContainer( stream );
 
         // Decode the ApReq PDU
-        kerberosDecoder.decode( stream, apReqContainer );
+        Asn1Decoder.decode( stream, apReqContainer );
         fail();
     }
 
@@ -345,7 +343,6 @@ public class ApReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testApReqEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -358,7 +355,7 @@ public class ApReqDecoderTest
         Asn1Container apReqContainer = new ApReqContainer( stream );
 
         // Decode the AP-REQ PDU
-        kerberosDecoder.decode( stream, apReqContainer );
+        Asn1Decoder.decode( stream, apReqContainer );
         fail();
     }
 
@@ -482,14 +479,13 @@ public class ApReqDecoderTest
 
         // Allocate a ApReq Container
         //ApReqContainer apReqContainer = new ApReqContainer( stream );
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
         ApReqContainer apReqContainer = new ApReqContainer( stream );
 
         long start = System.currentTimeMillis();
 
         for ( int i = 0; i < 10000000; ++i )
         {
-            kerberosDecoder.decode( stream, apReqContainer );
+            Asn1Decoder.decode( stream, apReqContainer );
             //String serverName = apreqContainer.getApReq().getTicket().getSName().toString();
             stream.rewind();
             apReqContainer.clean();
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java
index 9b8d3d2..65bffdb 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java
@@ -52,7 +52,6 @@ public class AsRepDecoderTest
     @Test
     public void testDecodeFullAsRep() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xAC );
 
@@ -235,7 +234,7 @@ public class AsRepDecoderTest
         // Decode the AsRep PDU
         try
         {
-            kerberosDecoder.decode( stream, asRepContainer );
+            Asn1Decoder.decode( stream, asRepContainer );
         }
         catch ( DecoderException de )
         {
@@ -273,7 +272,6 @@ public class AsRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testAsRepEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -286,7 +284,7 @@ public class AsRepDecoderTest
         Asn1Container asRepContainer = new AsRepContainer( stream );
 
         // Decode the AS-REP PDU
-        kerberosDecoder.decode( stream, asRepContainer );
+        Asn1Decoder.decode( stream, asRepContainer );
         fail();
     }
 
@@ -297,7 +295,6 @@ public class AsRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testAsRepEmptyPvnoTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -313,7 +310,7 @@ public class AsRepDecoderTest
         Asn1Container asRepContainer = new AsRepContainer( stream );
 
         // Decode the AS-REP PDU
-        kerberosDecoder.decode( stream, asRepContainer );
+        Asn1Decoder.decode( stream, asRepContainer );
         fail();
     }
 
@@ -324,7 +321,6 @@ public class AsRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testAsRepEmptyPvnoValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -341,7 +337,7 @@ public class AsRepDecoderTest
         Asn1Container asRepContainer = new AsRepContainer( stream );
 
         // Decode the AS-REP PDU
-        kerberosDecoder.decode( stream, asRepContainer );
+        Asn1Decoder.decode( stream, asRepContainer );
         fail();
     }
 
@@ -352,7 +348,6 @@ public class AsRepDecoderTest
     @Test
     public void testDecodeFullAsRep2() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x239 );
 
@@ -937,7 +932,7 @@ public class AsRepDecoderTest
         // Decode the AsRep PDU
         try
         {
-            kerberosDecoder.decode( stream, asRepContainer );
+            Asn1Decoder.decode( stream, asRepContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java
index a519a43..3090644 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java
@@ -53,7 +53,6 @@ public class AsReqDecoderTest
     @Test
     public void testDecodeFullAsReq() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x193 );
 
@@ -195,7 +194,7 @@ public class AsReqDecoderTest
         // Decode the AsReq PDU
         try
         {
-            kerberosDecoder.decode( stream, asReqContainer );
+            Asn1Decoder.decode( stream, asReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -235,7 +234,6 @@ public class AsReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeFullAsReqBadMsgType() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x193 );
 
@@ -375,7 +373,7 @@ public class AsReqDecoderTest
         AsReqContainer asReqContainer = new AsReqContainer( stream );
 
         // Decode the AsReq PDU
-        kerberosDecoder.decode( stream, asReqContainer );
+        Asn1Decoder.decode( stream, asReqContainer );
         fail();
     }
 
@@ -386,7 +384,6 @@ public class AsReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testAsReqEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -399,7 +396,7 @@ public class AsReqDecoderTest
         Asn1Container asReqContainer = new AsReqContainer( stream );
 
         // Decode the AS-REQ PDU
-        kerberosDecoder.decode( stream, asReqContainer );
+        Asn1Decoder.decode( stream, asReqContainer );
         fail();
     }
 
@@ -410,7 +407,6 @@ public class AsReqDecoderTest
     @Test
     public void testDecodeAsReqNoPaData() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x171 );
 
@@ -539,7 +535,7 @@ public class AsReqDecoderTest
         // Decode the AsReq PDU
         try
         {
-            kerberosDecoder.decode( stream, asReqContainer );
+            Asn1Decoder.decode( stream, asReqContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthenticatorDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthenticatorDecoderTest.java
index 2f82a47..b709442 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthenticatorDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthenticatorDecoderTest.java
@@ -53,7 +53,6 @@ public class AuthenticatorDecoderTest
     @Test
     public void testDecodeFullAuthenticator() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x95 );
 
@@ -214,7 +213,7 @@ public class AuthenticatorDecoderTest
         // Decode the Authenticator PDU
         try
         {
-            kerberosDecoder.decode( stream, authenticatorContainer );
+            Asn1Decoder.decode( stream, authenticatorContainer );
         }
         catch ( DecoderException de )
         {
@@ -253,7 +252,6 @@ public class AuthenticatorDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthenticatorEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -266,7 +264,7 @@ public class AuthenticatorDecoderTest
         Asn1Container authenticatorContainer = new AuthenticatorContainer( stream );
 
         // Decode the Authenticator PDU
-        kerberosDecoder.decode( stream, authenticatorContainer );
+        Asn1Decoder.decode( stream, authenticatorContainer );
         fail();
     }
 
@@ -277,7 +275,6 @@ public class AuthenticatorDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqBodyEmptySequence() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -293,7 +290,7 @@ public class AuthenticatorDecoderTest
         Asn1Container authenticatorContainer = new AuthenticatorContainer( stream );
 
         // Decode the Authenticator PDU
-        kerberosDecoder.decode( stream, authenticatorContainer );
+        Asn1Decoder.decode( stream, authenticatorContainer );
         fail();
     }
 
@@ -304,7 +301,6 @@ public class AuthenticatorDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqBodyEmptyAuthenticatorTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -321,7 +317,7 @@ public class AuthenticatorDecoderTest
         Asn1Container authenticatorContainer = new AuthenticatorContainer( stream );
 
         // Decode the Authenticator PDU
-        kerberosDecoder.decode( stream, authenticatorContainer );
+        Asn1Decoder.decode( stream, authenticatorContainer );
         fail();
     }
 
@@ -332,7 +328,6 @@ public class AuthenticatorDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqBodyEmptyAuthenticatorValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x08 );
 
@@ -350,7 +345,7 @@ public class AuthenticatorDecoderTest
         Asn1Container authenticatorContainer = new AuthenticatorContainer( stream );
 
         // Decode the Authenticator PDU
-        kerberosDecoder.decode( stream, authenticatorContainer );
+        Asn1Decoder.decode( stream, authenticatorContainer );
         fail();
     }
 
@@ -361,7 +356,6 @@ public class AuthenticatorDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqBodyNoOptions() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x152 );
 
@@ -479,7 +473,7 @@ public class AuthenticatorDecoderTest
         Asn1Container authenticatorContainer = new AuthenticatorContainer( stream );
 
         // Decode the Authenticator PDU
-        kerberosDecoder.decode( stream, authenticatorContainer );
+        Asn1Decoder.decode( stream, authenticatorContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthorizationDataDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthorizationDataDecoderTest.java
index 1267614..472c42f 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthorizationDataDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthorizationDataDecoderTest.java
@@ -51,7 +51,6 @@ public class AuthorizationDataDecoderTest
     @Test
     public void testAuthorizationData()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x21 );
 
@@ -97,7 +96,7 @@ public class AuthorizationDataDecoderTest
         // Decode the AuthorizationData PDU
         try
         {
-            kerberosDecoder.decode( stream, authDataContainer );
+            Asn1Decoder.decode( stream, authDataContainer );
         }
         catch ( DecoderException de )
         {
@@ -144,7 +143,6 @@ public class AuthorizationDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthorizationDataEmptyPdu() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -157,7 +155,7 @@ public class AuthorizationDataDecoderTest
 
         AuthorizationDataContainer authDataContainer = new AuthorizationDataContainer();
 
-        kerberosDecoder.decode( stream, authDataContainer );
+        Asn1Decoder.decode( stream, authDataContainer );
         fail();
     }
 
@@ -165,7 +163,6 @@ public class AuthorizationDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthorizationDataWithNoInnerData() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -179,7 +176,7 @@ public class AuthorizationDataDecoderTest
 
         AuthorizationDataContainer authDataContainer = new AuthorizationDataContainer();
 
-        kerberosDecoder.decode( stream, authDataContainer );
+        Asn1Decoder.decode( stream, authDataContainer );
         fail();
     }
 
@@ -187,7 +184,6 @@ public class AuthorizationDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthorizationDataEmptyTypeTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -202,7 +198,7 @@ public class AuthorizationDataDecoderTest
 
         AuthorizationDataContainer authDataContainer = new AuthorizationDataContainer();
 
-        kerberosDecoder.decode( stream, authDataContainer );
+        Asn1Decoder.decode( stream, authDataContainer );
         fail();
     }
 
@@ -210,7 +206,6 @@ public class AuthorizationDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthorizationDataEmptyTypeValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x08 );
 
@@ -227,7 +222,7 @@ public class AuthorizationDataDecoderTest
 
         AuthorizationDataContainer authDataContainer = new AuthorizationDataContainer();
 
-        kerberosDecoder.decode( stream, authDataContainer );
+        Asn1Decoder.decode( stream, authDataContainer );
         fail();
     }
 
@@ -235,7 +230,6 @@ public class AuthorizationDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthorizationDataWithoutType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -253,7 +247,7 @@ public class AuthorizationDataDecoderTest
 
         AuthorizationDataContainer authDataContainer = new AuthorizationDataContainer();
 
-        kerberosDecoder.decode( stream, authDataContainer );
+        Asn1Decoder.decode( stream, authDataContainer );
         fail();
     }
 
@@ -261,7 +255,6 @@ public class AuthorizationDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthorizationDataWithoutData() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -279,7 +272,7 @@ public class AuthorizationDataDecoderTest
 
         AuthorizationDataContainer authDataContainer = new AuthorizationDataContainer();
 
-        kerberosDecoder.decode( stream, authDataContainer );
+        Asn1Decoder.decode( stream, authDataContainer );
         fail();
     }
 
@@ -287,7 +280,6 @@ public class AuthorizationDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthorizationDataWithEmptyDataTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xB );
 
@@ -307,7 +299,7 @@ public class AuthorizationDataDecoderTest
 
         AuthorizationDataContainer authDataContainer = new AuthorizationDataContainer();
 
-        kerberosDecoder.decode( stream, authDataContainer );
+        Asn1Decoder.decode( stream, authDataContainer );
         fail();
     }
 
@@ -315,7 +307,6 @@ public class AuthorizationDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthorizationDataWithEmptyData() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xD );
 
@@ -337,7 +328,7 @@ public class AuthorizationDataDecoderTest
 
         AuthorizationDataContainer authDataContainer = new AuthorizationDataContainer();
 
-        kerberosDecoder.decode( stream, authDataContainer );
+        Asn1Decoder.decode( stream, authDataContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChangePasswdDataDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChangePasswdDataDecoderTest.java
index 82edd61..30c466d 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChangePasswdDataDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChangePasswdDataDecoderTest.java
@@ -41,7 +41,6 @@ public class ChangePasswdDataDecoderTest
     @Test
     public void testDecodeChangePasswdData() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         ByteBuffer buf = ByteBuffer.allocate( 0x30 );
         buf.put( new byte[]
@@ -100,7 +99,7 @@ public class ChangePasswdDataDecoderTest
 
         ChangePasswdDataContainer container = new ChangePasswdDataContainer( buf );
 
-        decoder.decode( buf, container );
+        Asn1Decoder.decode( buf, container );
 
         ChangePasswdData chngPwdData = container.getChngPwdData();
 
@@ -116,7 +115,6 @@ public class ChangePasswdDataDecoderTest
     @Test
     public void testDecodeChangePasswdDataWithoutTargName() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         ByteBuffer buf = ByteBuffer.allocate( 0x1B );
         buf.put( new byte[]
@@ -154,7 +152,7 @@ public class ChangePasswdDataDecoderTest
 
         ChangePasswdDataContainer container = new ChangePasswdDataContainer( buf );
 
-        decoder.decode( buf, container );
+        Asn1Decoder.decode( buf, container );
 
         ChangePasswdData chngPwdData = container.getChngPwdData();
 
@@ -169,7 +167,6 @@ public class ChangePasswdDataDecoderTest
     @Test
     public void testDecodeChangePasswdDataWithoutTargRealm() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         ByteBuffer buf = ByteBuffer.allocate( 0x21 );
         buf.put( new byte[]
@@ -212,7 +209,7 @@ public class ChangePasswdDataDecoderTest
 
         ChangePasswdDataContainer container = new ChangePasswdDataContainer( buf );
 
-        decoder.decode( buf, container );
+        Asn1Decoder.decode( buf, container );
 
         ChangePasswdData chngPwdData = container.getChngPwdData();
 
@@ -227,7 +224,6 @@ public class ChangePasswdDataDecoderTest
     @Test
     public void testDecodeChangePasswdDataWithoutTargNameAndRealm() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         ByteBuffer buf = ByteBuffer.allocate( 0x0C );
         buf.put( new byte[]
@@ -249,7 +245,7 @@ public class ChangePasswdDataDecoderTest
 
         ChangePasswdDataContainer container = new ChangePasswdDataContainer( buf );
 
-        decoder.decode( buf, container );
+        Asn1Decoder.decode( buf, container );
 
         ChangePasswdData chngPwdData = container.getChngPwdData();
 
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChecksumDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChecksumDecoderTest.java
index ebd50db..68f9e6e 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChecksumDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChecksumDecoderTest.java
@@ -48,7 +48,6 @@ public class ChecksumDecoderTest
     @Test
     public void testDecodeChecksum()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x11 );
 
@@ -78,7 +77,7 @@ public class ChecksumDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, chkContainer );
+            Asn1Decoder.decode( stream, chkContainer );
         }
         catch ( DecoderException de )
         {
@@ -113,7 +112,6 @@ public class ChecksumDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeChecksumWithoutType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xC );
 
@@ -135,7 +133,7 @@ public class ChecksumDecoderTest
 
         ChecksumContainer chkContainer = new ChecksumContainer();
 
-        krbDecoder.decode( stream, chkContainer );
+        Asn1Decoder.decode( stream, chkContainer );
         fail();
     }
 
@@ -143,7 +141,6 @@ public class ChecksumDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeChecksumWithoutChecksumValue() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -160,7 +157,7 @@ public class ChecksumDecoderTest
 
         ChecksumContainer chkContainer = new ChecksumContainer();
 
-        krbDecoder.decode( stream, chkContainer );
+        Asn1Decoder.decode( stream, chkContainer );
         fail();
     }
 
@@ -168,7 +165,6 @@ public class ChecksumDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeChecksumWithEmptySeq() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 2 );
 
@@ -181,7 +177,7 @@ public class ChecksumDecoderTest
 
         ChecksumContainer chkContainer = new ChecksumContainer();
 
-        krbDecoder.decode( stream, chkContainer );
+        Asn1Decoder.decode( stream, chkContainer );
         fail();
     }
 
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2DecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2DecoderTest.java
index 4672bef..f098aa9 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2DecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2DecoderTest.java
@@ -56,7 +56,6 @@ public class ETypeInfo2DecoderTest
     @Test
     public void testETypeInfo2()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x20 );
 
@@ -103,7 +102,7 @@ public class ETypeInfo2DecoderTest
         // Decode the ETypeInfo2 PDU
         try
         {
-            kerberosDecoder.decode( stream, etypeInfo2Container );
+            Asn1Decoder.decode( stream, etypeInfo2Container );
         }
         catch ( DecoderException de )
         {
@@ -153,7 +152,6 @@ public class ETypeInfo2DecoderTest
     @Test(expected = DecoderException.class)
     public void testETypeInfo2Empty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -166,7 +164,7 @@ public class ETypeInfo2DecoderTest
         Asn1Container etypeInfo2Container = new ETypeInfo2Container();
 
         // Decode the ETypeInfo2 PDU
-        kerberosDecoder.decode( stream, etypeInfo2Container );
+        Asn1Decoder.decode( stream, etypeInfo2Container );
         fail();
     }
 
@@ -177,7 +175,6 @@ public class ETypeInfo2DecoderTest
     @Test(expected = DecoderException.class)
     public void testETypeInfo2NoETypeInfo2Entry() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -193,7 +190,7 @@ public class ETypeInfo2DecoderTest
         Asn1Container etypeInfo2Container = new ETypeInfo2Container();
 
         // Decode the ETypeInfo2 PDU
-        kerberosDecoder.decode( stream, etypeInfo2Container );
+        Asn1Decoder.decode( stream, etypeInfo2Container );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2EntryDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2EntryDecoderTest.java
index 27732a7..80bc9ac 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2EntryDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2EntryDecoderTest.java
@@ -52,7 +52,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test
     public void testDecodeETypeInfoEntry()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x17 );
 
@@ -88,7 +87,7 @@ public class ETypeInfo2EntryDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
@@ -129,7 +128,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test
     public void testDecodeETypeInfo2EntryNoSaltNoS2KParams()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -149,7 +147,7 @@ public class ETypeInfo2EntryDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
@@ -190,7 +188,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeETypeInfo2EntryEmptySalt() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -209,7 +206,7 @@ public class ETypeInfo2EntryDecoderTest
 
         ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -220,7 +217,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test
     public void testDecodeETypeInfo2EntryNullSalt()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
@@ -243,7 +239,7 @@ public class ETypeInfo2EntryDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
@@ -298,7 +294,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEmptyETypeInfo2Entry() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -311,7 +306,7 @@ public class ETypeInfo2EntryDecoderTest
 
         ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -323,7 +318,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEmptyETypeInfo2EntryNoEType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -338,7 +332,7 @@ public class ETypeInfo2EntryDecoderTest
 
         ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -350,7 +344,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEmptyETypeInfo2EntryEmptyEType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -364,7 +357,7 @@ public class ETypeInfo2EntryDecoderTest
 
         ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -376,7 +369,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEmptyETypeInfo2EntryEmptyETypeTag() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -391,7 +383,7 @@ public class ETypeInfo2EntryDecoderTest
 
         ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -403,7 +395,6 @@ public class ETypeInfo2EntryDecoderTest
     @Test
     public void testDecodeEmptyETypeInfo2EntryBadEType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -420,7 +411,7 @@ public class ETypeInfo2EntryDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoDecoderTest.java
index 3a87916..55cb89e 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoDecoderTest.java
@@ -58,7 +58,6 @@ public class ETypeInfoDecoderTest
     @Test
     public void testETypeInfo()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x20 );
 
@@ -105,7 +104,7 @@ public class ETypeInfoDecoderTest
         // Decode the ETypeInfo PDU
         try
         {
-            kerberosDecoder.decode( stream, etypeInfoContainer );
+            Asn1Decoder.decode( stream, etypeInfoContainer );
         }
         catch ( DecoderException de )
         {
@@ -155,7 +154,6 @@ public class ETypeInfoDecoderTest
     @Test(expected = DecoderException.class)
     public void testETypeInfoEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -168,7 +166,7 @@ public class ETypeInfoDecoderTest
         Asn1Container etypeInfoContainer = new ETypeInfoContainer();
 
         // Decode the ETypeInfo PDU
-        kerberosDecoder.decode( stream, etypeInfoContainer );
+        Asn1Decoder.decode( stream, etypeInfoContainer );
         fail();
     }
 
@@ -179,7 +177,6 @@ public class ETypeInfoDecoderTest
     @Test(expected = DecoderException.class)
     public void testETypeInfoNoETypeInfoEntry() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -195,7 +192,7 @@ public class ETypeInfoDecoderTest
         Asn1Container etypeInfoContainer = new ETypeInfoContainer();
 
         // Decode the ETypeInfo PDU
-        kerberosDecoder.decode( stream, etypeInfoContainer );
+        Asn1Decoder.decode( stream, etypeInfoContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoEntryDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoEntryDecoderTest.java
index 569ca58..21bff4b 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoEntryDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoEntryDecoderTest.java
@@ -52,7 +52,6 @@ public class ETypeInfoEntryDecoderTest
     @Test
     public void testDecodeETypeInfoEntry()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0F );
 
@@ -80,7 +79,7 @@ public class ETypeInfoEntryDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
@@ -120,7 +119,6 @@ public class ETypeInfoEntryDecoderTest
     @Test
     public void testDecodeETypeInfoEntryNoSalt()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -140,7 +138,7 @@ public class ETypeInfoEntryDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
@@ -180,7 +178,6 @@ public class ETypeInfoEntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeETypeInfoEntryEmptySalt() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -199,7 +196,7 @@ public class ETypeInfoEntryDecoderTest
 
         ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -210,7 +207,6 @@ public class ETypeInfoEntryDecoderTest
     @Test
     public void testDecodeETypeInfoEntryNullSalt()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
@@ -233,7 +229,7 @@ public class ETypeInfoEntryDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
@@ -287,7 +283,6 @@ public class ETypeInfoEntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEmptyETypeInforEntry() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -300,7 +295,7 @@ public class ETypeInfoEntryDecoderTest
 
         ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -312,7 +307,6 @@ public class ETypeInfoEntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEmptyETypeInfoEntryNoEType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -327,7 +321,7 @@ public class ETypeInfoEntryDecoderTest
 
         ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -339,7 +333,6 @@ public class ETypeInfoEntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEmptyETypeInfoEntryEmptyEType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -353,7 +346,7 @@ public class ETypeInfoEntryDecoderTest
 
         ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -365,7 +358,6 @@ public class ETypeInfoEntryDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEmptyETypeInfoEntryEmptyETypeTag() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -380,7 +372,7 @@ public class ETypeInfoEntryDecoderTest
 
         ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -392,7 +384,6 @@ public class ETypeInfoEntryDecoderTest
     @Test
     public void testDecodeEmptyETypeInfoEntryBadEType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -409,7 +400,7 @@ public class ETypeInfoEntryDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncApRepPartDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncApRepPartDecoderTest.java
index cbfb034..e19bb78 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncApRepPartDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncApRepPartDecoderTest.java
@@ -53,7 +53,6 @@ public class EncApRepPartDecoderTest
     @Test
     public void testDecodeFullEncApRepPart() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x33 );
 
@@ -118,7 +117,7 @@ public class EncApRepPartDecoderTest
         // Decode the EncApRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encApRepPartContainer );
+            Asn1Decoder.decode( stream, encApRepPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -157,7 +156,6 @@ public class EncApRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testAuthenticatorEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -170,7 +168,7 @@ public class EncApRepPartDecoderTest
         Asn1Container encApRepPartContainer = new EncApRepPartContainer( stream );
 
         // Decode the EncApRepPart PDU
-        kerberosDecoder.decode( stream, encApRepPartContainer );
+        Asn1Decoder.decode( stream, encApRepPartContainer );
         fail();
     }
 
@@ -181,7 +179,6 @@ public class EncApRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncApRepPartEmptySequence() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -197,7 +194,7 @@ public class EncApRepPartDecoderTest
         Asn1Container encApRepPartContainer = new EncApRepPartContainer( stream );
 
         // Decode the EncApRepPart PDU
-        kerberosDecoder.decode( stream, encApRepPartContainer );
+        Asn1Decoder.decode( stream, encApRepPartContainer );
         fail();
     }
 
@@ -208,7 +205,6 @@ public class EncApRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncApRepPartEmptyCTimeg() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -225,7 +221,7 @@ public class EncApRepPartDecoderTest
         Asn1Container encApRepPartContainer = new EncApRepPartContainer( stream );
 
         // Decode the EncApRepPart PDU
-        kerberosDecoder.decode( stream, encApRepPartContainer );
+        Asn1Decoder.decode( stream, encApRepPartContainer );
         fail();
     }
 
@@ -236,7 +232,6 @@ public class EncApRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncApRepPartNoCtime() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x20 );
 
@@ -279,7 +274,7 @@ public class EncApRepPartDecoderTest
         Asn1Container encApRepPartContainer = new EncApRepPartContainer( stream );
 
         // Decode the EncApRepPart PDU
-        kerberosDecoder.decode( stream, encApRepPartContainer );
+        Asn1Decoder.decode( stream, encApRepPartContainer );
         fail();
     }
 
@@ -290,7 +285,6 @@ public class EncApRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncApRepPartNoCusec() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x2F );
 
@@ -347,7 +341,7 @@ public class EncApRepPartDecoderTest
         Asn1Container encApRepPartContainer = new EncApRepPartContainer( stream );
 
         // Decode the EncApRepPart PDU
-        kerberosDecoder.decode( stream, encApRepPartContainer );
+        Asn1Decoder.decode( stream, encApRepPartContainer );
         fail();
     }
 
@@ -358,7 +352,6 @@ public class EncApRepPartDecoderTest
     @Test
     public void testDecodeEncApRepPartNoSubKey() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x22 );
 
@@ -406,7 +399,7 @@ public class EncApRepPartDecoderTest
         // Decode the EncApRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encApRepPartContainer );
+            Asn1Decoder.decode( stream, encApRepPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -445,7 +438,6 @@ public class EncApRepPartDecoderTest
     @Test
     public void testDecodeEncApRepPartNoSeqNumber() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x2D );
 
@@ -504,7 +496,7 @@ public class EncApRepPartDecoderTest
         // Decode the EncApRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encApRepPartContainer );
+            Asn1Decoder.decode( stream, encApRepPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -543,7 +535,6 @@ public class EncApRepPartDecoderTest
     @Test
     public void testDecodeEncApRepPartNoSubKeyNoSeqNumber() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x1C );
 
@@ -585,7 +576,7 @@ public class EncApRepPartDecoderTest
         // Decode the EncApRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encApRepPartContainer );
+            Asn1Decoder.decode( stream, encApRepPartContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncAsRepPartDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncAsRepPartDecoderTest.java
index 1017bc7..fb72dd5 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncAsRepPartDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncAsRepPartDecoderTest.java
@@ -52,7 +52,6 @@ public class EncAsRepPartDecoderTest
     @Test
     public void testDecodeFullEncAsRepPart() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xA2 );
 
@@ -111,7 +110,7 @@ public class EncAsRepPartDecoderTest
         // Decode the EncAsRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encAsRepPartContainer );
+            Asn1Decoder.decode( stream, encAsRepPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -149,7 +148,6 @@ public class EncAsRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncAsRepPartEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -162,7 +160,7 @@ public class EncAsRepPartDecoderTest
         Asn1Container encAsRepPartContainer = new EncAsRepPartContainer( stream );
 
         // Decode the EncAsRepPart PDU
-        kerberosDecoder.decode( stream, encAsRepPartContainer );
+        Asn1Decoder.decode( stream, encAsRepPartContainer );
         fail();
     }
 
@@ -173,7 +171,6 @@ public class EncAsRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncAsRepPartEmptyEncKdcRepPart() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -189,7 +186,7 @@ public class EncAsRepPartDecoderTest
         Asn1Container encAsRepPartContainer = new EncAsRepPartContainer( stream );
 
         // Decode the EncAsRepPart PDU
-        kerberosDecoder.decode( stream, encAsRepPartContainer );
+        Asn1Decoder.decode( stream, encAsRepPartContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPartDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPartDecoderTest.java
index a157af4..e9237c2 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPartDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPartDecoderTest.java
@@ -50,7 +50,6 @@ public class EncKdcRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncKdcRepPartEmpty() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x02;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -65,7 +64,7 @@ public class EncKdcRepPartDecoderTest
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
         // Decode the EncKdcRepPart PDU
-        decoder.decode( stream, encKdcRepPartContainer );
+        Asn1Decoder.decode( stream, encKdcRepPartContainer );
         fail();
     }
 
@@ -77,7 +76,6 @@ public class EncKdcRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncKdcRepPartEmptyKey() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x04;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -93,7 +91,7 @@ public class EncKdcRepPartDecoderTest
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
         // Decode the EncKdcRepPart PDU
-        decoder.decode( stream, encKdcRepPartContainer );
+        Asn1Decoder.decode( stream, encKdcRepPartContainer );
         fail();
     }
 
@@ -105,7 +103,6 @@ public class EncKdcRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncKdcRepPartMissingKey() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x04;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -121,7 +118,7 @@ public class EncKdcRepPartDecoderTest
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
         // Decode the EncKdcRepPart PDU
-        decoder.decode( stream, encKdcRepPartContainer );
+        Asn1Decoder.decode( stream, encKdcRepPartContainer );
         fail();
     }
 
@@ -133,7 +130,6 @@ public class EncKdcRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncKdcRepPartEmptylastReq() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x17;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -156,7 +152,7 @@ public class EncKdcRepPartDecoderTest
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
         // Decode the EncKdcRepPart PDU
-        decoder.decode( stream, encKdcRepPartContainer );
+        Asn1Decoder.decode( stream, encKdcRepPartContainer );
         fail();
     }
 
@@ -168,7 +164,6 @@ public class EncKdcRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncKdcRepPartLastReqMissing() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x17;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -191,7 +186,7 @@ public class EncKdcRepPartDecoderTest
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
         // Decode the EncKdcRepPart PDU
-        decoder.decode( stream, encKdcRepPartContainer );
+        Asn1Decoder.decode( stream, encKdcRepPartContainer );
         fail();
     }
 
@@ -203,7 +198,6 @@ public class EncKdcRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncKdcRepPartEmptyNonce() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x4F;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -240,7 +234,7 @@ public class EncKdcRepPartDecoderTest
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
         // Decode the EncKdcRepPart PDU
-        decoder.decode( stream, encKdcRepPartContainer );
+        Asn1Decoder.decode( stream, encKdcRepPartContainer );
         fail();
     }
 
@@ -252,7 +246,6 @@ public class EncKdcRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncKdcRepPartNonceMissing() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x4F;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -289,7 +282,7 @@ public class EncKdcRepPartDecoderTest
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
         // Decode the EncKdcRepPart PDU
-        decoder.decode( stream, encKdcRepPartContainer );
+        Asn1Decoder.decode( stream, encKdcRepPartContainer );
         fail();
     }
 
@@ -301,7 +294,6 @@ public class EncKdcRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncKdcRepPartEmptyKeyExpiration() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x54;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -340,7 +332,7 @@ public class EncKdcRepPartDecoderTest
         Asn1Container encKdcRepPartContainer = new EncKdcRepPartContainer( stream );
 
         // Decode the EncKdcRepPart PDU
-        decoder.decode( stream, encKdcRepPartContainer );
+        Asn1Decoder.decode( stream, encKdcRepPartContainer );
         fail();
     }
 
@@ -352,7 +344,6 @@ public class EncKdcRepPartDecoderTest
     @Test
     public void testDecodeEncKdcRepPartNoOptionalFields() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x9F;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -411,7 +402,7 @@ public class EncKdcRepPartDecoderTest
         // Decode the EncKdcRepPart PDU
         try
         {
-            decoder.decode( stream, encKdcRepPartContainer );
+            Asn1Decoder.decode( stream, encKdcRepPartContainer );
         }
         catch ( Exception e )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKrbCredPartDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKrbCredPartDecoderTest.java
index 9273971..398b283 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKrbCredPartDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKrbCredPartDecoderTest.java
@@ -147,12 +147,11 @@ public class EncKrbCredPartDecoderTest
             expected.encode( stream );
             stream.flip();
 
-            Asn1Decoder decoder = new Asn1Decoder();
             EncKrbCredPartContainer container = new EncKrbCredPartContainer( stream );
 
             try
             {
-                decoder.decode( stream, container );
+                Asn1Decoder.decode( stream, container );
             }
             catch ( DecoderException e )
             {
@@ -192,12 +191,11 @@ public class EncKrbCredPartDecoderTest
             expected.encode( stream );
             stream.flip();
 
-            Asn1Decoder decoder = new Asn1Decoder();
             EncKrbCredPartContainer container = new EncKrbCredPartContainer( stream );
 
             try
             {
-                decoder.decode( stream, container );
+                Asn1Decoder.decode( stream, container );
             }
             catch ( DecoderException e )
             {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKrbPrivPartDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKrbPrivPartDecoderTest.java
index 2de9c2f..c342ad1 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKrbPrivPartDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncKrbPrivPartDecoderTest.java
@@ -50,7 +50,6 @@ public class EncKrbPrivPartDecoderTest
     @Test
     public void testDecodeEncKrbPrivPart() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x49;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -135,7 +134,7 @@ public class EncKrbPrivPartDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -178,7 +177,6 @@ public class EncKrbPrivPartDecoderTest
     @Test
     public void testDecodeEncKrbPrivPartWithoutTimestamp() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x36;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -245,7 +243,7 @@ public class EncKrbPrivPartDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -287,7 +285,6 @@ public class EncKrbPrivPartDecoderTest
     @Test
     public void testDecodeEncKrbPrivPartWithoutTimestampAndUsec() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x31;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -349,7 +346,7 @@ public class EncKrbPrivPartDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -391,7 +388,6 @@ public class EncKrbPrivPartDecoderTest
     @Test
     public void testDecodeEncKrbPrivPartWithoutTimestampUsecAndSeqNumber() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x2C;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -448,7 +444,7 @@ public class EncKrbPrivPartDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -491,7 +487,6 @@ public class EncKrbPrivPartDecoderTest
     @Test
     public void testDecodeEncKrbPrivPartWithoutSequenceNumber() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x44;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -572,7 +567,7 @@ public class EncKrbPrivPartDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -615,7 +610,6 @@ public class EncKrbPrivPartDecoderTest
     @Test
     public void testDecodeEncKrbPrivPartWithoutOptionalValues() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x1B;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -656,7 +650,7 @@ public class EncKrbPrivPartDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncTgsRepPartDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncTgsRepPartDecoderTest.java
index 06163d1..1efb983 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncTgsRepPartDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncTgsRepPartDecoderTest.java
@@ -52,7 +52,6 @@ public class EncTgsRepPartDecoderTest
     @Test
     public void testDecodeFullEncTgsRepPart() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xA2 );
 
@@ -111,7 +110,7 @@ public class EncTgsRepPartDecoderTest
         // Decode the EncTgsRepPart PDU
         try
         {
-            kerberosDecoder.decode( stream, encTgsRepPartContainer );
+            Asn1Decoder.decode( stream, encTgsRepPartContainer );
         }
         catch ( DecoderException de )
         {
@@ -149,7 +148,6 @@ public class EncTgsRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncTgsRepPartEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -162,7 +160,7 @@ public class EncTgsRepPartDecoderTest
         Asn1Container encTgsRepPartContainer = new EncTgsRepPartContainer( stream );
 
         // Decode the EncTgsRepPart PDU
-        kerberosDecoder.decode( stream, encTgsRepPartContainer );
+        Asn1Decoder.decode( stream, encTgsRepPartContainer );
         fail();
     }
 
@@ -173,7 +171,6 @@ public class EncTgsRepPartDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncTgsRepPartEmptyEncKdcRepPart() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -189,7 +186,7 @@ public class EncTgsRepPartDecoderTest
         Asn1Container encTgsRepPartContainer = new EncTgsRepPartContainer( stream );
 
         // Decode the EncTgsRepPart PDU
-        kerberosDecoder.decode( stream, encTgsRepPartContainer );
+        Asn1Decoder.decode( stream, encTgsRepPartContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncTicketPartDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncTicketPartDecoderTest.java
index 3a5e07e..b25b633 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncTicketPartDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncTicketPartDecoderTest.java
@@ -177,12 +177,11 @@ public class EncTicketPartDecoderTest
 
         stream.flip();
 
-        Asn1Decoder decoder = new Asn1Decoder();
         EncTicketPartContainer container = new EncTicketPartContainer( stream );
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptedDataDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptedDataDecoderTest.java
index 5fa63e4..f0a67f0 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptedDataDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptedDataDecoderTest.java
@@ -58,7 +58,6 @@ public class EncryptedDataDecoderTest
     @Test
     public void testEncryptedData()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x16 );
 
@@ -95,7 +94,7 @@ public class EncryptedDataDecoderTest
         // Decode the EncryptedData PDU
         try
         {
-            kerberosDecoder.decode( stream, encryptedDataContainer );
+            Asn1Decoder.decode( stream, encryptedDataContainer );
         }
         catch ( DecoderException de )
         {
@@ -136,7 +135,6 @@ public class EncryptedDataDecoderTest
     @Test
     public void testEncryptedDataNoKvno()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x11 );
 
@@ -168,7 +166,7 @@ public class EncryptedDataDecoderTest
         // Decode the EncryptedData PDU
         try
         {
-            kerberosDecoder.decode( stream, encryptedDataContainer );
+            Asn1Decoder.decode( stream, encryptedDataContainer );
         }
         catch ( DecoderException de )
         {
@@ -209,7 +207,6 @@ public class EncryptedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncryptedDataEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -222,7 +219,7 @@ public class EncryptedDataDecoderTest
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
         // Decode the EncryptedData PDU
-        kerberosDecoder.decode( stream, encryptedDataContainer );
+        Asn1Decoder.decode( stream, encryptedDataContainer );
         fail();
     }
 
@@ -233,7 +230,6 @@ public class EncryptedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncryptedDataNoEType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -248,7 +244,7 @@ public class EncryptedDataDecoderTest
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
         // Decode the EncryptedData PDU
-        kerberosDecoder.decode( stream, encryptedDataContainer );
+        Asn1Decoder.decode( stream, encryptedDataContainer );
         fail();
     }
 
@@ -259,7 +255,6 @@ public class EncryptedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncryptedDataMissingEType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x11 );
 
@@ -288,7 +283,7 @@ public class EncryptedDataDecoderTest
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
         // Decode the EncryptedData PDU
-        kerberosDecoder.decode( stream, encryptedDataContainer );
+        Asn1Decoder.decode( stream, encryptedDataContainer );
         fail();
     }
 
@@ -299,7 +294,6 @@ public class EncryptedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncryptedDataEmptyType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
@@ -316,7 +310,7 @@ public class EncryptedDataDecoderTest
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
         // Decode the EncryptedData PDU
-        kerberosDecoder.decode( stream, encryptedDataContainer );
+        Asn1Decoder.decode( stream, encryptedDataContainer );
         fail();
     }
 
@@ -327,7 +321,6 @@ public class EncryptedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncryptedDataEmptyKvno() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -347,7 +340,7 @@ public class EncryptedDataDecoderTest
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
         // Decode the EncryptedData PDU
-        kerberosDecoder.decode( stream, encryptedDataContainer );
+        Asn1Decoder.decode( stream, encryptedDataContainer );
         fail();
     }
 
@@ -358,7 +351,6 @@ public class EncryptedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncryptedDataNoCipher() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0C );
 
@@ -381,7 +373,7 @@ public class EncryptedDataDecoderTest
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
         // Decode the EncryptedData PDU
-        kerberosDecoder.decode( stream, encryptedDataContainer );
+        Asn1Decoder.decode( stream, encryptedDataContainer );
         fail();
     }
 
@@ -392,7 +384,6 @@ public class EncryptedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncryptedDataEmptyCipher() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0E );
 
@@ -417,7 +408,7 @@ public class EncryptedDataDecoderTest
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
         // Decode the EncryptedData PDU
-        kerberosDecoder.decode( stream, encryptedDataContainer );
+        Asn1Decoder.decode( stream, encryptedDataContainer );
         fail();
     }
 
@@ -428,7 +419,6 @@ public class EncryptedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testEncryptedDataNullCipher() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x10 );
 
@@ -455,6 +445,6 @@ public class EncryptedDataDecoderTest
         Asn1Container encryptedDataContainer = new EncryptedDataContainer();
 
         // Decode the EncryptedData PDU
-        kerberosDecoder.decode( stream, encryptedDataContainer );
+        Asn1Decoder.decode( stream, encryptedDataContainer );
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptionKeyDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptionKeyDecoderTest.java
index 202cf7c..ab83a6c 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptionKeyDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptionKeyDecoderTest.java
@@ -48,7 +48,6 @@ public class EncryptionKeyDecoderTest
     @Test
     public void testDecodeFullEncryptionKey()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x11 );
 
@@ -78,7 +77,7 @@ public class EncryptionKeyDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
@@ -115,7 +114,6 @@ public class EncryptionKeyDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncryptionKeyWithEmptySeq() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -128,7 +126,7 @@ public class EncryptionKeyDecoderTest
 
         EncryptionKeyContainer container = new EncryptionKeyContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -136,7 +134,6 @@ public class EncryptionKeyDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncryptionKeyEmptyKeyTypeTag() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -150,7 +147,7 @@ public class EncryptionKeyDecoderTest
 
         EncryptionKeyContainer container = new EncryptionKeyContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -158,7 +155,6 @@ public class EncryptionKeyDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncryptionKeyEmptyKeyTypeValue() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -173,7 +169,7 @@ public class EncryptionKeyDecoderTest
 
         EncryptionKeyContainer container = new EncryptionKeyContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -181,7 +177,6 @@ public class EncryptionKeyDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeEncryptionKeyWithoutType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0C );
 
@@ -203,7 +198,7 @@ public class EncryptionKeyDecoderTest
 
         EncryptionKeyContainer chkContainer = new EncryptionKeyContainer();
 
-        krbDecoder.decode( stream, chkContainer );
+        Asn1Decoder.decode( stream, chkContainer );
         fail();
     }
 
@@ -211,7 +206,6 @@ public class EncryptionKeyDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeChecksumWithoutEncryptionKeyValue() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -228,7 +222,7 @@ public class EncryptionKeyDecoderTest
 
         EncryptionKeyContainer container = new EncryptionKeyContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -236,7 +230,6 @@ public class EncryptionKeyDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeChecksumWitEmptyEncryptionKeyTag() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -255,7 +248,7 @@ public class EncryptionKeyDecoderTest
 
         EncryptionKeyContainer container = new EncryptionKeyContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -263,7 +256,6 @@ public class EncryptionKeyDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeChecksumWitEmptyEncryptionKeyValue() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
@@ -284,7 +276,7 @@ public class EncryptionKeyDecoderTest
 
         EncryptionKeyContainer container = new EncryptionKeyContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressDecoderTest.java
index b5a050c..322e55e 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressDecoderTest.java
@@ -57,7 +57,6 @@ public class HostAddressDecoderTest
     @Test
     public void testHostAddress()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x16 );
 
@@ -94,7 +93,7 @@ public class HostAddressDecoderTest
         // Decode the HostAddress PDU
         try
         {
-            kerberosDecoder.decode( stream, hostAddressContainer );
+            Asn1Decoder.decode( stream, hostAddressContainer );
         }
         catch ( DecoderException de )
         {
@@ -134,7 +133,6 @@ public class HostAddressDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -147,7 +145,7 @@ public class HostAddressDecoderTest
         Asn1Container hostAddressContainer = new HostAddressContainer();
 
         // Decode the HostAddress PDU
-        kerberosDecoder.decode( stream, hostAddressContainer );
+        Asn1Decoder.decode( stream, hostAddressContainer );
         fail();
     }
 
@@ -158,7 +156,6 @@ public class HostAddressDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressNoAddrType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -174,7 +171,7 @@ public class HostAddressDecoderTest
         Asn1Container hostAddressContainer = new HostAddressContainer();
 
         // Decode the HostAddress PDU
-        kerberosDecoder.decode( stream, hostAddressContainer );
+        Asn1Decoder.decode( stream, hostAddressContainer );
         fail();
     }
 
@@ -185,7 +182,6 @@ public class HostAddressDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressEmptyAddrType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
@@ -203,7 +199,7 @@ public class HostAddressDecoderTest
         Asn1Container hostAddressContainer = new HostAddressContainer();
 
         // Decode the HostAddress PDU
-        kerberosDecoder.decode( stream, hostAddressContainer );
+        Asn1Decoder.decode( stream, hostAddressContainer );
         fail();
     }
 
@@ -214,7 +210,6 @@ public class HostAddressDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressNoAddress() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -234,7 +229,7 @@ public class HostAddressDecoderTest
         Asn1Container hostAddressContainer = new HostAddressContainer();
 
         // Decode the HostAddress PDU
-        kerberosDecoder.decode( stream, hostAddressContainer );
+        Asn1Decoder.decode( stream, hostAddressContainer );
         fail();
     }
 
@@ -245,7 +240,6 @@ public class HostAddressDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressEmptyAddress() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0E );
 
@@ -268,7 +262,7 @@ public class HostAddressDecoderTest
         Asn1Container hostAddressContainer = new HostAddressContainer();
 
         // Decode the HostAddress PDU
-        kerberosDecoder.decode( stream, hostAddressContainer );
+        Asn1Decoder.decode( stream, hostAddressContainer );
         fail();
     }
 
@@ -279,7 +273,6 @@ public class HostAddressDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressMissingAddrType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x11 );
 
@@ -308,7 +301,7 @@ public class HostAddressDecoderTest
         Asn1Container hostAddressContainer = new HostAddressContainer();
 
         // Decode the HostAddress PDU
-        kerberosDecoder.decode( stream, hostAddressContainer );
+        Asn1Decoder.decode( stream, hostAddressContainer );
         fail();
     }
 
@@ -319,7 +312,6 @@ public class HostAddressDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressMissingAddress() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -338,7 +330,7 @@ public class HostAddressDecoderTest
         Asn1Container hostAddressContainer = new HostAddressContainer();
 
         // Decode the HostAddress PDU
-        kerberosDecoder.decode( stream, hostAddressContainer );
+        Asn1Decoder.decode( stream, hostAddressContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressesDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressesDecoderTest.java
index fcbaf6e..14bbeac 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressesDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressesDecoderTest.java
@@ -59,7 +59,6 @@ public class HostAddressesDecoderTest
     @Test
     public void testHostAddresses()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x44 );
 
@@ -142,7 +141,7 @@ public class HostAddressesDecoderTest
         // Decode the HostAddresses PDU
         try
         {
-            kerberosDecoder.decode( stream, hostAddressesContainer );
+            Asn1Decoder.decode( stream, hostAddressesContainer );
         }
         catch ( DecoderException de )
         {
@@ -192,7 +191,6 @@ public class HostAddressesDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -205,7 +203,7 @@ public class HostAddressesDecoderTest
         Asn1Container hostAddressesContainer = new HostAddressesContainer();
 
         // Decode the HostAddress PDU
-        kerberosDecoder.decode( stream, hostAddressesContainer );
+        Asn1Decoder.decode( stream, hostAddressesContainer );
         fail();
     }
 
@@ -216,7 +214,6 @@ public class HostAddressesDecoderTest
     @Test(expected = DecoderException.class)
     public void testHostAddressesNoHostAddress() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -231,7 +228,7 @@ public class HostAddressesDecoderTest
         Asn1Container hostAddressesContainer = new HostAddressContainer();
 
         // Decode the HostAddresses PDU
-        kerberosDecoder.decode( stream, hostAddressesContainer );
+        Asn1Decoder.decode( stream, hostAddressesContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java
index 9af9e96..f6c27a7 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java
@@ -53,7 +53,6 @@ public class KdcRepDecoderTest
     @Test
     public void testDecodeFullKdcRep() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xA9 );
 
@@ -236,7 +235,7 @@ public class KdcRepDecoderTest
         // Decode the KdcRep PDU
         try
         {
-            kerberosDecoder.decode( stream, kdcRepContainer );
+            Asn1Decoder.decode( stream, kdcRepContainer );
         }
         catch ( DecoderException de )
         {
@@ -274,7 +273,6 @@ public class KdcRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcRepEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -287,7 +285,7 @@ public class KdcRepDecoderTest
         Asn1Container kdcRepContainer = new KdcRepContainer( stream );
 
         // Decode the KDC-REP PDU
-        kerberosDecoder.decode( stream, kdcRepContainer );
+        Asn1Decoder.decode( stream, kdcRepContainer );
         fail();
     }
 
@@ -298,7 +296,6 @@ public class KdcRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcRepEmptyPvnoTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -314,7 +311,7 @@ public class KdcRepDecoderTest
         Asn1Container kdcRepContainer = new KdcRepContainer( stream );
 
         // Decode the KDC-REP PDU
-        kerberosDecoder.decode( stream, kdcRepContainer );
+        Asn1Decoder.decode( stream, kdcRepContainer );
         fail();
     }
 
@@ -325,7 +322,6 @@ public class KdcRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcRepEmptyPvnoValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -342,7 +338,7 @@ public class KdcRepDecoderTest
         Asn1Container kdcRepContainer = new KdcRepContainer( stream );
 
         // Decode the KDC-REP PDU
-        kerberosDecoder.decode( stream, kdcRepContainer );
+        Asn1Decoder.decode( stream, kdcRepContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqBodyDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqBodyDecoderTest.java
index 97311b0..c324c0c 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqBodyDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqBodyDecoderTest.java
@@ -64,7 +64,6 @@ public class KdcReqBodyDecoderTest
     @Test
     public void testDecodeFullKdcReqBody() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x15B );
 
@@ -187,7 +186,7 @@ public class KdcReqBodyDecoderTest
         // Decode the KdcReqBody PDU
         try
         {
-            kerberosDecoder.decode( stream, kdcReqBodyContainer );
+            Asn1Decoder.decode( stream, kdcReqBodyContainer );
         }
         catch ( DecoderException de )
         {
@@ -265,7 +264,6 @@ public class KdcReqBodyDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqBodyEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -278,7 +276,7 @@ public class KdcReqBodyDecoderTest
         Asn1Container kdcReqBodyContainer = new KdcReqBodyContainer( stream );
 
         // Decode the KDC-REQ-BODY PDU
-        kerberosDecoder.decode( stream, kdcReqBodyContainer );
+        Asn1Decoder.decode( stream, kdcReqBodyContainer );
         fail();
     }
 
@@ -289,7 +287,6 @@ public class KdcReqBodyDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqBodyEmptyOptionTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -305,7 +302,7 @@ public class KdcReqBodyDecoderTest
         Asn1Container kdcReqBodyContainer = new KdcReqBodyContainer( stream );
 
         // Decode the KDC-REQ-BODY PDU
-        kerberosDecoder.decode( stream, kdcReqBodyContainer );
+        Asn1Decoder.decode( stream, kdcReqBodyContainer );
         fail();
     }
 
@@ -316,7 +313,6 @@ public class KdcReqBodyDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqBodyEmptyOptionValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -333,7 +329,7 @@ public class KdcReqBodyDecoderTest
         Asn1Container kdcReqBodyContainer = new KdcReqBodyContainer( stream );
 
         // Decode the KDC-REQ-BODY PDU
-        kerberosDecoder.decode( stream, kdcReqBodyContainer );
+        Asn1Decoder.decode( stream, kdcReqBodyContainer );
         fail();
     }
 
@@ -344,7 +340,6 @@ public class KdcReqBodyDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqBodyNoOptions() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x152 );
 
@@ -462,7 +457,7 @@ public class KdcReqBodyDecoderTest
         Asn1Container kdcReqBodyContainer = new KdcReqBodyContainer( stream );
 
         // Decode the KDC-REQ-BODY PDU
-        kerberosDecoder.decode( stream, kdcReqBodyContainer );
+        Asn1Decoder.decode( stream, kdcReqBodyContainer );
         fail();
     }
 
@@ -474,7 +469,6 @@ public class KdcReqBodyDecoderTest
     @Test
     public void testDecodeKdcReqBodyNoOptionalValue() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x40 );
 
@@ -509,7 +503,7 @@ public class KdcReqBodyDecoderTest
         // Decode the KdcReqBody PDU
         try
         {
-            kerberosDecoder.decode( stream, kdcReqBodyContainer );
+            Asn1Decoder.decode( stream, kdcReqBodyContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java
index 81547bf..871bcff 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java
@@ -53,7 +53,6 @@ public class KdcReqDecoderTest
     @Test
     public void testDecodeFullKdcReq() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x18F );
 
@@ -195,7 +194,7 @@ public class KdcReqDecoderTest
         // Decode the KdcReq PDU
         try
         {
-            kerberosDecoder.decode( stream, kdcReqContainer );
+            Asn1Decoder.decode( stream, kdcReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -233,7 +232,6 @@ public class KdcReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -246,7 +244,7 @@ public class KdcReqDecoderTest
         Asn1Container kdcReqContainer = new KdcReqContainer( stream );
 
         // Decode the KDC-REQ PDU
-        kerberosDecoder.decode( stream, kdcReqContainer );
+        Asn1Decoder.decode( stream, kdcReqContainer );
         fail();
     }
 
@@ -257,7 +255,6 @@ public class KdcReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqEmptyPvnoTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -273,7 +270,7 @@ public class KdcReqDecoderTest
         Asn1Container kdcReqContainer = new KdcReqContainer( stream );
 
         // Decode the KDC-REQ PDU
-        kerberosDecoder.decode( stream, kdcReqContainer );
+        Asn1Decoder.decode( stream, kdcReqContainer );
         fail();
     }
 
@@ -284,7 +281,6 @@ public class KdcReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testKdcReqEmptyPvnoValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -301,7 +297,7 @@ public class KdcReqDecoderTest
         Asn1Container kdcReqContainer = new KdcReqContainer( stream );
 
         // Decode the KDC-REQ PDU
-        kerberosDecoder.decode( stream, kdcReqContainer );
+        Asn1Decoder.decode( stream, kdcReqContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java
index 68d2124..4db6ef6 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java
@@ -55,8 +55,6 @@ public class KerberosMessageDecoderTest
     @Test
     public void testDecodeKerberosMessages() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x21 );
 
         stream.put( new byte[]
@@ -102,7 +100,7 @@ public class KerberosMessageDecoderTest
         // Decode the ApRep PDU
         try
         {
-            kerberosDecoder.decode( stream, kerberosMessageContainer );
+            Asn1Decoder.decode( stream, kerberosMessageContainer );
         }
         catch ( DecoderException de )
         {
@@ -273,7 +271,7 @@ public class KerberosMessageDecoderTest
         // Decode the TgsReq PDU
         try
         {
-            kerberosDecoder.decode( stream, tgsReqContainer );
+            Asn1Decoder.decode( stream, tgsReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -445,7 +443,7 @@ public class KerberosMessageDecoderTest
         // Decode the AsReq PDU
         try
         {
-            kerberosDecoder.decode( stream, asReqContainer );
+            Asn1Decoder.decode( stream, asReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -537,7 +535,7 @@ public class KerberosMessageDecoderTest
         // Decode the AsReq PDU
         try
         {
-            kerberosDecoder.decode( stream, asReqContainer );
+            Asn1Decoder.decode( stream, asReqContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java
index a6972e7..1ba515f 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java
@@ -75,9 +75,7 @@ public class KrbCredDecoderTest
 
         KrbCredContainer container = new KrbCredContainer( stream );
 
-        Asn1Decoder decoder = new Asn1Decoder();
-
-        decoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
 
         KrbCred actual = container.getKrbCred();
 
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredInfoDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredInfoDecoderTest.java
index 8488fac..4dcc870 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredInfoDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredInfoDecoderTest.java
@@ -174,13 +174,12 @@ public class KrbCredInfoDecoderTest
             expected.encode( stream );
             stream.flip();
 
-            Asn1Decoder decoder = new Asn1Decoder();
             KrbCredInfoContainer container = new KrbCredInfoContainer();
             container.setStream( stream );
 
             try
             {
-                decoder.decode( stream, container );
+                Asn1Decoder.decode( stream, container );
             }
             catch ( DecoderException e )
             {
@@ -221,13 +220,12 @@ public class KrbCredInfoDecoderTest
             expected.encode( stream );
             stream.flip();
 
-            Asn1Decoder decoder = new Asn1Decoder();
             KrbCredInfoContainer container = new KrbCredInfoContainer();
             container.setStream( stream );
 
             try
             {
-                decoder.decode( stream, container );
+                Asn1Decoder.decode( stream, container );
             }
             catch ( DecoderException e )
             {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java
index 7cf050c..a03ed6f 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java
@@ -50,7 +50,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbError()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x8F;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -203,7 +202,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -249,7 +248,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutCtime()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x7A;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -386,7 +384,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -418,7 +416,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutCusec()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x8A;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -567,7 +564,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -599,7 +596,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutCtimeAndCusec()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x75;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -731,7 +727,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -764,7 +760,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutCrealm()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x84;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -908,7 +903,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -940,7 +935,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutCname()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x79;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -1074,7 +1068,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -1106,7 +1100,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutCrealmAndCname()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x6F;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -1230,7 +1223,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -1263,7 +1256,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutEtext()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x86;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -1408,7 +1400,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -1440,7 +1432,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutEdata()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x89;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -1587,7 +1578,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -1619,7 +1610,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutEtextAndEdata()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x7E;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -1758,7 +1748,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -1791,7 +1781,6 @@ public class KrbErrorDecoderTest
     @Test
     public void testDecodeKrbErrorWithoutOptionalFields()
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x48;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -1875,7 +1864,7 @@ public class KrbErrorDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java
index dce48b1..d06212f 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java
@@ -82,13 +82,11 @@ public class KrbPrivDecoderTest
 
         String decoded = Strings.dumpBytes( stream.array() );
 
-        Asn1Decoder decoder = new Asn1Decoder();
-
         KrbPrivContainer container = new KrbPrivContainer( stream );
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeBodyDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeBodyDecoderTest.java
index 1b927a8..908dede 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeBodyDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeBodyDecoderTest.java
@@ -50,7 +50,6 @@ public class KrbSafeBodyDecoderTest
     @Test
     public void testDecodeKrbSafeBody() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x47;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -135,7 +134,7 @@ public class KrbSafeBodyDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -178,7 +177,6 @@ public class KrbSafeBodyDecoderTest
     @Test
     public void testDecodeKrbSafeBodyWithoutTimestamp() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x34;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -245,7 +243,7 @@ public class KrbSafeBodyDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -287,7 +285,6 @@ public class KrbSafeBodyDecoderTest
     @Test
     public void testDecodeKrbSafeBodyWithoutTimestampAndUsec() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x2F;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -349,7 +346,7 @@ public class KrbSafeBodyDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -391,7 +388,6 @@ public class KrbSafeBodyDecoderTest
     @Test
     public void testDecodeKrbSafeBodyWithoutTimestampUsecAndSeqNumber() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x2A;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -448,7 +444,7 @@ public class KrbSafeBodyDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -491,7 +487,6 @@ public class KrbSafeBodyDecoderTest
     @Test
     public void testDecodeKrbSafeBodyWithoutSequenceNumber() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x42;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -572,7 +567,7 @@ public class KrbSafeBodyDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -615,7 +610,6 @@ public class KrbSafeBodyDecoderTest
     @Test
     public void testDecodeKrbSafeBodyWithoutOptionalValues() throws Exception
     {
-        Asn1Decoder decoder = new Asn1Decoder();
 
         int streamLen = 0x19;
         ByteBuffer stream = ByteBuffer.allocate( streamLen );
@@ -656,7 +650,7 @@ public class KrbSafeBodyDecoderTest
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java
index af95dc3..df22a70 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java
@@ -109,13 +109,11 @@ public class KrbSafeDecoderTest
         int streamLen = data.length;
         ByteBuffer stream = ByteBuffer.wrap( data );
 
-        Asn1Decoder decoder = new Asn1Decoder();
-
         KrbSafeContainer container = new KrbSafeContainer( stream );
 
         try
         {
-            decoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException e )
         {
@@ -168,10 +166,8 @@ public class KrbSafeDecoderTest
 
         ByteBuffer stream = ByteBuffer.wrap( data );
 
-        Asn1Decoder decoder = new Asn1Decoder();
-
         KrbSafeContainer container = new KrbSafeContainer( stream );
 
-        decoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/LastReqDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/LastReqDecoderTest.java
index df5819d..98e962e 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/LastReqDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/LastReqDecoderTest.java
@@ -49,7 +49,6 @@ public class LastReqDecoderTest
     @Test
     public void testLastReqData()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x36 );
 
@@ -116,7 +115,7 @@ public class LastReqDecoderTest
         // Decode the LastReq PDU
         try
         {
-            kerberosDecoder.decode( stream, lastReqContainer );
+            Asn1Decoder.decode( stream, lastReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -163,7 +162,6 @@ public class LastReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testLastReqWithoutType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x15 );
 
@@ -194,7 +192,7 @@ public class LastReqDecoderTest
 
         LastReqContainer lastReqContainer = new LastReqContainer();
 
-        kerberosDecoder.decode( stream, lastReqContainer );
+        Asn1Decoder.decode( stream, lastReqContainer );
         fail();
     }
 
@@ -202,7 +200,6 @@ public class LastReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testLastReqWithoutValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -218,7 +215,7 @@ public class LastReqDecoderTest
 
         LastReqContainer lastReqContainer = new LastReqContainer();
 
-        kerberosDecoder.decode( stream, lastReqContainer );
+        Asn1Decoder.decode( stream, lastReqContainer );
         fail();
     }
 
@@ -226,7 +223,6 @@ public class LastReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testLastReqWithIncorrectPdu() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -237,7 +233,7 @@ public class LastReqDecoderTest
 
         LastReqContainer lastReqContainer = new LastReqContainer();
 
-        kerberosDecoder.decode( stream, lastReqContainer );
+        Asn1Decoder.decode( stream, lastReqContainer );
         fail();
     }
 
@@ -245,7 +241,6 @@ public class LastReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testLastReqWithEmptyValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xB );
 
@@ -266,7 +261,7 @@ public class LastReqDecoderTest
 
         LastReqContainer lastReqContainer = new LastReqContainer();
 
-        kerberosDecoder.decode( stream, lastReqContainer );
+        Asn1Decoder.decode( stream, lastReqContainer );
         fail();
     }
 
@@ -274,7 +269,6 @@ public class LastReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testLastReqWithEmptyType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x19 );
 
@@ -309,7 +303,7 @@ public class LastReqDecoderTest
 
         LastReqContainer lastReqContainer = new LastReqContainer();
 
-        kerberosDecoder.decode( stream, lastReqContainer );
+        Asn1Decoder.decode( stream, lastReqContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/MethodDataDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/MethodDataDecoderTest.java
index 03b1f38..e92193b 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/MethodDataDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/MethodDataDecoderTest.java
@@ -58,7 +58,6 @@ public class MethodDataDecoderTest
     @Test
     public void testMethodData()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x24 );
 
@@ -109,7 +108,7 @@ public class MethodDataDecoderTest
         // Decode the MethodData PDU
         try
         {
-            kerberosDecoder.decode( stream, methodDataContainer );
+            Asn1Decoder.decode( stream, methodDataContainer );
         }
         catch ( DecoderException de )
         {
@@ -159,7 +158,6 @@ public class MethodDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testETypeInfoEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -172,7 +170,7 @@ public class MethodDataDecoderTest
         Asn1Container methodDataContainer = new MethodDataContainer();
 
         // Decode the METHOD-DATA PDU
-        kerberosDecoder.decode( stream, methodDataContainer );
+        Asn1Decoder.decode( stream, methodDataContainer );
         fail();
     }
 
@@ -183,7 +181,6 @@ public class MethodDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testETypeInfoNoETypeInfoEntry() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -199,7 +196,7 @@ public class MethodDataDecoderTest
         Asn1Container methodDataContainer = new MethodDataContainer();
 
         // Decode the METHOD-DATA PDU
-        kerberosDecoder.decode( stream, methodDataContainer );
+        Asn1Decoder.decode( stream, methodDataContainer );
         fail();
         fail();
     }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java
index 4e149a4..bf0b70d 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java
@@ -48,7 +48,6 @@ public class PaDataDecoderTest
     @Test
     public void testDecodePaData()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x11 );
 
@@ -78,7 +77,7 @@ public class PaDataDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, container );
+            Asn1Decoder.decode( stream, container );
         }
         catch ( DecoderException de )
         {
@@ -115,7 +114,6 @@ public class PaDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodePaDataWithoutType() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xC );
 
@@ -137,7 +135,7 @@ public class PaDataDecoderTest
 
         PaDataContainer chkContainer = new PaDataContainer();
 
-        krbDecoder.decode( stream, chkContainer );
+        Asn1Decoder.decode( stream, chkContainer );
         fail();
     }
 
@@ -145,7 +143,6 @@ public class PaDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeChecksumWithoutPaDataValue() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -162,7 +159,7 @@ public class PaDataDecoderTest
 
         PaDataContainer container = new PaDataContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
         fail();
     }
 
@@ -170,7 +167,6 @@ public class PaDataDecoderTest
     @Test
     public void testDecodePaDataWithEmptySeq() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x11 );
 
@@ -191,7 +187,7 @@ public class PaDataDecoderTest
 
         PaDataContainer container = new PaDataContainer();
 
-        krbDecoder.decode( stream, container );
+        Asn1Decoder.decode( stream, container );
     }
 
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTimestampDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTimestampDecoderTest.java
index 71ac339..2ef2973 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTimestampDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTimestampDecoderTest.java
@@ -57,7 +57,6 @@ public class PaEncTimestampDecoderTest
     @Test
     public void testPaEncTimestamp()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x16 );
 
@@ -94,7 +93,7 @@ public class PaEncTimestampDecoderTest
         // Decode the PaEncTimestamp PDU
         try
         {
-            kerberosDecoder.decode( stream, paEncTimestampContainer );
+            Asn1Decoder.decode( stream, paEncTimestampContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTsEncDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTsEncDecoderTest.java
index 361647c..1e1bb8b 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTsEncDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTsEncDecoderTest.java
@@ -45,7 +45,6 @@ public class PaEncTsEncDecoderTest
     @Test
     public void testDecodeFullPaEncTsEnc()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x1A );
 
@@ -84,7 +83,7 @@ public class PaEncTsEncDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, paEncTsEncContainer );
+            Asn1Decoder.decode( stream, paEncTsEncContainer );
         }
         catch ( DecoderException de )
         {
@@ -119,7 +118,6 @@ public class PaEncTsEncDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodePaEncTsEncWithEmptySeq() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 2 );
 
@@ -132,7 +130,7 @@ public class PaEncTsEncDecoderTest
 
         PaEncTsEncContainer paEncTsEncContainer = new PaEncTsEncContainer();
 
-        krbDecoder.decode( stream, paEncTsEncContainer );
+        Asn1Decoder.decode( stream, paEncTsEncContainer );
         fail();
     }
 
@@ -140,7 +138,6 @@ public class PaEncTsEncDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodePaEncTsEncEmptyPaTimestamp() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 4 );
 
@@ -154,7 +151,7 @@ public class PaEncTsEncDecoderTest
 
         PaEncTsEncContainer paEncTsEncContainer = new PaEncTsEncContainer();
 
-        krbDecoder.decode( stream, paEncTsEncContainer );
+        Asn1Decoder.decode( stream, paEncTsEncContainer );
         fail();
     }
 
@@ -162,7 +159,6 @@ public class PaEncTsEncDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrNullPaTimestamp() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 6 );
 
@@ -177,7 +173,7 @@ public class PaEncTsEncDecoderTest
 
         PaEncTsEncContainer paEncTsEncContainer = new PaEncTsEncContainer();
 
-        krbDecoder.decode( stream, paEncTsEncContainer );
+        Asn1Decoder.decode( stream, paEncTsEncContainer );
         fail();
     }
 
@@ -185,7 +181,6 @@ public class PaEncTsEncDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeAdAndOrNoPaTimestamp() throws DecoderException
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
 
@@ -202,7 +197,7 @@ public class PaEncTsEncDecoderTest
 
         PaEncTsEncContainer paEncTsEncContainer = new PaEncTsEncContainer();
 
-        krbDecoder.decode( stream, paEncTsEncContainer );
+        Asn1Decoder.decode( stream, paEncTsEncContainer );
         fail();
     }
 
@@ -210,7 +205,6 @@ public class PaEncTsEncDecoderTest
     @Test
     public void testDecodePaEncTsEncNoPaUsec()
     {
-        Asn1Decoder krbDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x15 );
 
@@ -244,7 +238,7 @@ public class PaEncTsEncDecoderTest
 
         try
         {
-            krbDecoder.decode( stream, paEncTsEncContainer );
+            Asn1Decoder.decode( stream, paEncTsEncContainer );
         }
         catch ( DecoderException de )
         {
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PrincipalNameDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PrincipalNameDecoderTest.java
index cc27b91..7edcf9b 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PrincipalNameDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PrincipalNameDecoderTest.java
@@ -55,7 +55,6 @@ public class PrincipalNameDecoderTest
     @Test
     public void testPrincipalName()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x29 );
 
@@ -110,7 +109,7 @@ public class PrincipalNameDecoderTest
         // Decode the PrincipalName PDU
         try
         {
-            kerberosDecoder.decode( stream, principalNameContainer );
+            Asn1Decoder.decode( stream, principalNameContainer );
         }
         catch ( DecoderException de )
         {
@@ -152,7 +151,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -165,7 +163,7 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
         fail();
     }
 
@@ -176,7 +174,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameNoType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -191,7 +188,7 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
         fail();
     }
 
@@ -202,7 +199,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameEmptyType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -219,7 +215,7 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
         fail();
     }
 
@@ -230,7 +226,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameBadType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
@@ -252,7 +247,7 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
         fail();
     }
 
@@ -263,7 +258,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameEmptyName() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -283,7 +277,7 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
         fail();
     }
 
@@ -294,7 +288,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameNoName() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
@@ -316,7 +309,7 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
         fail();
     }
 
@@ -327,7 +320,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameBadName() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0D );
 
@@ -351,7 +343,7 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
         fail();
     }
 
@@ -362,7 +354,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameBadName2() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x29 );
 
@@ -414,7 +405,7 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
     }
 
 
@@ -424,7 +415,6 @@ public class PrincipalNameDecoderTest
     @Test(expected = DecoderException.class)
     public void testPrincipalNameNoNameType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x24 );
 
@@ -471,6 +461,6 @@ public class PrincipalNameDecoderTest
         Asn1Container principalNameContainer = new PrincipalNameContainer();
 
         // Decode the PrincipalName PDU
-        kerberosDecoder.decode( stream, principalNameContainer );
+        Asn1Decoder.decode( stream, principalNameContainer );
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java
index cbe90c0..07e8365 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java
@@ -52,7 +52,6 @@ public class TgsRepDecoderTest
     @Test
     public void testDecodeFullTgsRep() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0xAC );
 
@@ -235,7 +234,7 @@ public class TgsRepDecoderTest
         // Decode the TgsRep PDU
         try
         {
-            kerberosDecoder.decode( stream, tgsRepContainer );
+            Asn1Decoder.decode( stream, tgsRepContainer );
         }
         catch ( DecoderException de )
         {
@@ -273,7 +272,6 @@ public class TgsRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testTgsRepEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -286,7 +284,7 @@ public class TgsRepDecoderTest
         Asn1Container tgsRepContainer = new TgsRepContainer( stream );
 
         // Decode the TGS-REP PDU
-        kerberosDecoder.decode( stream, tgsRepContainer );
+        Asn1Decoder.decode( stream, tgsRepContainer );
         fail();
     }
 
@@ -297,7 +295,6 @@ public class TgsRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testTgsRepEmptyPvnoTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -313,7 +310,7 @@ public class TgsRepDecoderTest
         Asn1Container tgsRepContainer = new TgsRepContainer( stream );
 
         // Decode the TGS-REP PDU
-        kerberosDecoder.decode( stream, tgsRepContainer );
+        Asn1Decoder.decode( stream, tgsRepContainer );
         fail();
     }
 
@@ -324,7 +321,6 @@ public class TgsRepDecoderTest
     @Test(expected = DecoderException.class)
     public void testTgsRepEmptyPvnoValue() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -341,7 +337,7 @@ public class TgsRepDecoderTest
         Asn1Container tgsRepContainer = new TgsRepContainer( stream );
 
         // Decode the TGS-REP PDU
-        kerberosDecoder.decode( stream, tgsRepContainer );
+        Asn1Decoder.decode( stream, tgsRepContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java
index 552297f..d870d42 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java
@@ -53,7 +53,6 @@ public class TgsReqDecoderTest
     @Test
     public void testDecodeFullTgsReq() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x193 );
 
@@ -195,7 +194,7 @@ public class TgsReqDecoderTest
         // Decode the TgsReq PDU
         try
         {
-            kerberosDecoder.decode( stream, tgsReqContainer );
+            Asn1Decoder.decode( stream, tgsReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -235,7 +234,6 @@ public class TgsReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeFullTgsReqBadMsgType() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x193 );
 
@@ -375,7 +373,7 @@ public class TgsReqDecoderTest
         TgsReqContainer tgsReqContainer = new TgsReqContainer( stream );
 
         // Decode the TgsReq PDU
-        kerberosDecoder.decode( stream, tgsReqContainer );
+        Asn1Decoder.decode( stream, tgsReqContainer );
         fail();
     }
 
@@ -386,7 +384,6 @@ public class TgsReqDecoderTest
     @Test(expected = DecoderException.class)
     public void testTgsReqEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -399,7 +396,7 @@ public class TgsReqDecoderTest
         Asn1Container tgsReqContainer = new TgsReqContainer( stream );
 
         // Decode the TGS-REQ PDU
-        kerberosDecoder.decode( stream, tgsReqContainer );
+        Asn1Decoder.decode( stream, tgsReqContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TicketDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TicketDecoderTest.java
index 6306059..386e997 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TicketDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TicketDecoderTest.java
@@ -59,7 +59,6 @@ public class TicketDecoderTest
     @Test
     public void testDecodeFullTicket()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x46 );
 
@@ -144,7 +143,7 @@ public class TicketDecoderTest
         // Decode the Ticket PDU
         try
         {
-            kerberosDecoder.decode( stream, ticketContainer );
+            Asn1Decoder.decode( stream, ticketContainer );
         }
         catch ( DecoderException de )
         {
@@ -196,7 +195,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmpty() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
@@ -209,7 +207,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -219,7 +217,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptySEQ() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
@@ -235,7 +232,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -245,7 +242,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptyTktVnoTag() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
@@ -262,7 +258,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -272,7 +268,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptyTktVnoValue() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x08 );
 
@@ -290,7 +285,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -300,7 +295,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketBadTktVnoValue() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -318,7 +312,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -328,7 +322,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketNoRealm() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
@@ -346,7 +339,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -356,7 +349,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptyRealmTag() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0B );
 
@@ -375,7 +367,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -385,7 +377,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptyRealmValue() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x0D );
 
@@ -405,7 +396,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -415,7 +406,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketNoSname() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x18 );
 
@@ -435,7 +425,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -445,7 +435,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptySnameTag() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x1A );
 
@@ -466,7 +455,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -476,7 +465,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptySnameValue() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x1C );
 
@@ -498,7 +486,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -508,7 +496,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketBadSName() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x20 );
 
@@ -553,7 +540,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -563,7 +550,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketNoEncPart() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x2E );
 
@@ -622,7 +608,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -632,7 +618,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptyEncPartTag() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x30 );
 
@@ -693,7 +678,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -703,7 +688,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketEmptyEncPart() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x32 );
 
@@ -766,7 +750,7 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 
 
@@ -776,7 +760,6 @@ public class TicketDecoderTest
     @Test(expected = DecoderException.class)
     public void testDecodeTicketBadEncPart() throws Exception
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
         ByteBuffer stream = ByteBuffer.allocate( 0x34 );
 
@@ -841,6 +824,6 @@ public class TicketDecoderTest
         Asn1Container ticketContainer = new TicketContainer( stream );
 
         // Decode the Ticket PDU
-        kerberosDecoder.decode( stream, ticketContainer );
+        Asn1Decoder.decode( stream, ticketContainer );
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TransitedEncodingDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TransitedEncodingDecoderTest.java
index 814612d..e6b5617 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TransitedEncodingDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TransitedEncodingDecoderTest.java
@@ -57,7 +57,6 @@ public class TransitedEncodingDecoderTest
     @Test
     public void testTransitedEncoding()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
         int len = 0x11;
 
         ByteBuffer stream = ByteBuffer.allocate( len );
@@ -89,7 +88,7 @@ public class TransitedEncodingDecoderTest
         // Decode the TransitedEncoding PDU
         try
         {
-            kerberosDecoder.decode( stream, transitedEncodingContainer );
+            Asn1Decoder.decode( stream, transitedEncodingContainer );
         }
         catch ( DecoderException de )
         {
@@ -130,8 +129,6 @@ public class TransitedEncodingDecoderTest
     @Test(expected = DecoderException.class)
     public void testTransitedEncodingEmpty() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x02 );
 
         stream.put( new byte[]
@@ -143,7 +140,7 @@ public class TransitedEncodingDecoderTest
         Asn1Container transitedEncodingContainer = new TransitedEncodingContainer();
 
         // Decode the TransitedEncoding PDU
-        kerberosDecoder.decode( stream, transitedEncodingContainer );
+        Asn1Decoder.decode( stream, transitedEncodingContainer );
         fail();
     }
 
@@ -154,8 +151,6 @@ public class TransitedEncodingDecoderTest
     @Test(expected = DecoderException.class)
     public void testTransitedEncodingEmptyTrTypeTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
         stream.put( new byte[]
@@ -169,7 +164,7 @@ public class TransitedEncodingDecoderTest
         Asn1Container transitedEncodingContainer = new TransitedEncodingContainer();
 
         // Decode the TransitedEncoding PDU
-        kerberosDecoder.decode( stream, transitedEncodingContainer );
+        Asn1Decoder.decode( stream, transitedEncodingContainer );
         fail();
     }
 
@@ -180,8 +175,6 @@ public class TransitedEncodingDecoderTest
     @Test(expected = DecoderException.class)
     public void testTransitedEncodingNoTrType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
         stream.put( new byte[]
@@ -197,7 +190,7 @@ public class TransitedEncodingDecoderTest
         Asn1Container transitedEncodingContainer = new TransitedEncodingContainer();
 
         // Decode the TransitedEncoding PDU
-        kerberosDecoder.decode( stream, transitedEncodingContainer );
+        Asn1Decoder.decode( stream, transitedEncodingContainer );
         fail();
     }
 
@@ -208,8 +201,6 @@ public class TransitedEncodingDecoderTest
     @Test(expected = DecoderException.class)
     public void testTransitedEncodingNoTrTypeTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x06 );
 
         stream.put( new byte[]
@@ -225,7 +216,7 @@ public class TransitedEncodingDecoderTest
         Asn1Container transitedEncodingContainer = new TransitedEncodingContainer();
 
         // Decode the TransitedEncoding PDU
-        kerberosDecoder.decode( stream, transitedEncodingContainer );
+        Asn1Decoder.decode( stream, transitedEncodingContainer );
         fail();
     }
 
@@ -236,8 +227,6 @@ public class TransitedEncodingDecoderTest
     @Test(expected = DecoderException.class)
     public void testTransitedEncodingEmptyContentsTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
         stream.put( new byte[]
@@ -256,7 +245,7 @@ public class TransitedEncodingDecoderTest
         Asn1Container transitedEncodingContainer = new TransitedEncodingContainer();
 
         // Decode the TransitedEncoding PDU
-        kerberosDecoder.decode( stream, transitedEncodingContainer );
+        Asn1Decoder.decode( stream, transitedEncodingContainer );
         fail();
     }
 
@@ -267,8 +256,6 @@ public class TransitedEncodingDecoderTest
     @Test(expected = DecoderException.class)
     public void testTransitedEncodingBadTag() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x0C );
 
         stream.put( new byte[]
@@ -290,7 +277,7 @@ public class TransitedEncodingDecoderTest
         Asn1Container transitedEncodingContainer = new TransitedEncodingContainer();
 
         // Decode the TransitedEncoding PDU
-        kerberosDecoder.decode( stream, transitedEncodingContainer );
+        Asn1Decoder.decode( stream, transitedEncodingContainer );
         fail();
     }
 }
diff --git a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TypedDataDecoderTest.java b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TypedDataDecoderTest.java
index 1cfd923..d876d82 100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TypedDataDecoderTest.java
+++ b/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TypedDataDecoderTest.java
@@ -49,8 +49,6 @@ public class TypedDataDecoderTest
     @Test
     public void testTypedData()
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x21 );
 
         stream.put( new byte[]
@@ -95,7 +93,7 @@ public class TypedDataDecoderTest
         // Decode the TypedData PDU
         try
         {
-            kerberosDecoder.decode( stream, typedDataContainer );
+            Asn1Decoder.decode( stream, typedDataContainer );
         }
         catch ( DecoderException de )
         {
@@ -141,8 +139,6 @@ public class TypedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testTypedDataWithoutType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
         stream.put( new byte[]
@@ -158,7 +154,7 @@ public class TypedDataDecoderTest
 
         TypedDataContainer typedDataContainer = new TypedDataContainer();
 
-        kerberosDecoder.decode( stream, typedDataContainer );
+        Asn1Decoder.decode( stream, typedDataContainer );
         fail();
     }
 
@@ -166,8 +162,6 @@ public class TypedDataDecoderTest
     @Test
     public void testTypedDataWithoutData() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
 
         stream.put( new byte[]
@@ -183,7 +177,7 @@ public class TypedDataDecoderTest
 
         TypedDataContainer typedDataContainer = new TypedDataContainer();
 
-        kerberosDecoder.decode( stream, typedDataContainer );
+        Asn1Decoder.decode( stream, typedDataContainer );
 
         TypedData typedData = typedDataContainer.getTypedData();
 
@@ -196,8 +190,6 @@ public class TypedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testTypedDataWithIncorrectPdu() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0x04 );
 
         stream.put( new byte[]
@@ -210,7 +202,7 @@ public class TypedDataDecoderTest
 
         TypedDataContainer typedDataContainer = new TypedDataContainer();
 
-        kerberosDecoder.decode( stream, typedDataContainer );
+        Asn1Decoder.decode( stream, typedDataContainer );
         fail();
     }
 
@@ -218,8 +210,6 @@ public class TypedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testTypedDataWithEmptyData() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0xD );
 
         stream.put( new byte[]
@@ -240,7 +230,7 @@ public class TypedDataDecoderTest
 
         TypedDataContainer typedDataContainer = new TypedDataContainer();
 
-        kerberosDecoder.decode( stream, typedDataContainer );
+        Asn1Decoder.decode( stream, typedDataContainer );
         fail();
     }
 
@@ -248,8 +238,6 @@ public class TypedDataDecoderTest
     @Test(expected = DecoderException.class)
     public void testTypedDataWithEmptyType() throws DecoderException
     {
-        Asn1Decoder kerberosDecoder = new Asn1Decoder();
-
         ByteBuffer stream = ByteBuffer.allocate( 0xD );
 
         stream.put( new byte[]
@@ -270,7 +258,7 @@ public class TypedDataDecoderTest
 
         TypedDataContainer typedDataContainer = new TypedDataContainer();
 
-        kerberosDecoder.decode( stream, typedDataContainer );
+        Asn1Decoder.decode( stream, typedDataContainer );
         fail();
     }
 }
diff --git a/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java b/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java
index ca51127..b6667cd 100644
--- a/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java
+++ b/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java
@@ -266,10 +266,9 @@ public final class ChangePasswordService
             }
             else
             {
-                Asn1Decoder passwordDecoder = new Asn1Decoder();
                 ByteBuffer stream = ByteBuffer.wrap( privatePart.getUserData() );
                 ChangePasswdDataContainer container = new ChangePasswdDataContainer( stream );
-                passwordDecoder.decode( stream, container );
+                Asn1Decoder.decode( stream, container );
                 passwordData = container.getChngPwdData();
             }
         }
diff --git a/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/MinaKerberosDecoder.java b/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/MinaKerberosDecoder.java
index 276d66b..4252225 100644
--- a/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/MinaKerberosDecoder.java
+++ b/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/MinaKerberosDecoder.java
@@ -44,9 +44,6 @@ public class MinaKerberosDecoder extends CumulativeProtocolDecoder
     /** the key used while storing message container in the session */
     private static final String KERBEROS_MESSAGE_CONTAINER = "kerberosMessageContainer";
 
-    /** The ASN 1 decoder instance */
-    private Asn1Decoder asn1Decoder = new Asn1Decoder();
-
     private static final int DEFAULT_MAX_PDU_SIZE = 1024 * 7; // 7KB
     
     /** the maximum allowed PDU size for a Kerberos request */
@@ -144,7 +141,7 @@ public class MinaKerberosDecoder extends CumulativeProtocolDecoder
                 stream.flip();
             }
             
-            asn1Decoder.decode( stream, krbMsgContainer );
+            Asn1Decoder.decode( stream, krbMsgContainer );
             
             if ( krbMsgContainer.getState() == TLVStateEnum.PDU_DECODED )
             {
diff --git a/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java b/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
index 7bc588e..cab9eef 100644
--- a/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
+++ b/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
@@ -21,7 +21,7 @@ package org.apache.directory.server.ldap;
 
 
 import org.apache.directory.api.ldap.codec.api.LdapDecoder;
-import org.apache.directory.api.ldap.codec.api.LdapMessageContainerDirect;
+import org.apache.directory.api.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.api.ldap.codec.api.SchemaBinaryAttributeDetector;
 import org.apache.directory.api.ldap.model.exception.ResponseCarryingMessageException;
 import org.apache.directory.api.ldap.model.message.Control;
@@ -86,8 +86,8 @@ class LdapProtocolHandler extends DemuxingIoHandler
         session.setAttribute( LdapDecoder.MAX_PDU_SIZE_ATTR, ldapServer.getDirectoryService().getMaxPDUSize() );
 
         // Last, store the message container
-        LdapMessageContainerDirect<Message> ldapMessageContainer =
-            new LdapMessageContainerDirect<>(
+        LdapMessageContainer<Message> ldapMessageContainer =
+            new LdapMessageContainer<>(
                 ldapServer.getDirectoryService().getLdapCodecService(),
                 new SchemaBinaryAttributeDetector(
                     ldapServer.getDirectoryService().getSchemaManager() ) );
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
index 65cd568..bfe6579 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
@@ -38,7 +38,7 @@ import org.apache.commons.net.SocketClient;
 import org.apache.directory.api.asn1.util.Asn1Buffer;
 import org.apache.directory.api.ldap.codec.api.LdapDecoder;
 import org.apache.directory.api.ldap.codec.api.LdapEncoder;
-import org.apache.directory.api.ldap.codec.api.LdapMessageContainerDirect;
+import org.apache.directory.api.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.api.ldap.model.constants.SaslQoP;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.constants.SupportedSaslMechanisms;
@@ -711,7 +711,7 @@ public class SaslBindIT extends AbstractLdapTestUnit
 
             // Send encoded request to server
             Asn1Buffer buffer = new Asn1Buffer();
-            ByteBuffer bb = LdapEncoder.encodeMessageReverse( buffer, getService().getLdapCodecService(), request );
+            ByteBuffer bb = LdapEncoder.encodeMessage( buffer, getService().getLdapCodecService(), request );
 
             bb.flip();
 
@@ -724,7 +724,7 @@ public class SaslBindIT extends AbstractLdapTestUnit
             }
 
             // Retrieve the response back from server to my last request.
-            LdapMessageContainerDirect<? extends Message> container = new LdapMessageContainerDirect(
+            LdapMessageContainer<? extends Message> container = new LdapMessageContainer(
                 ldapServer.getDirectoryService().getLdapCodecService() );
             
             return ( BindResponse ) decoder.decode( _input_, container );
@@ -752,7 +752,7 @@ public class SaslBindIT extends AbstractLdapTestUnit
 
             // Send encoded request to server
             Asn1Buffer buffer = new Asn1Buffer();
-            ByteBuffer bb = LdapEncoder.encodeMessageReverse( buffer, getService().getLdapCodecService(), request );
+            ByteBuffer bb = LdapEncoder.encodeMessage( buffer, getService().getLdapCodecService(), request );
             bb.flip();
 
             _output_.write( bb.array() );
@@ -764,7 +764,7 @@ public class SaslBindIT extends AbstractLdapTestUnit
             }
 
             // Retrieve the response back from server to my last request.
-            LdapMessageContainerDirect<? extends Message> container = new LdapMessageContainerDirect(
+            LdapMessageContainer<? extends Message> container = new LdapMessageContainer(
                 ldapServer.getDirectoryService().getLdapCodecService() );
             
             return ( BindResponse ) decoder.decode( _input_, container );


Mime
View raw message