{
fail( de.getMessage() );
}
// Check the decoded ETypeInfo
MethodData methodData = ( ( MethodDataContainer ) methodDataContainer ).getMethodData();
assertEquals( 2, methodData.getPaDatas().length );
String[] expected = new String[]{ "abcdef", "ghijkl" };
int i = 0;
for ( PaData paData : methodData.getPaDatas() )
{
assertEquals( PaDataType.PA_ENC_TIMESTAMP, paData.getPaDataType() );
assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i]), paData.getPaDataValue() ) );
i++;
}
// Check the encoding
ByteBuffer bb = ByteBuffer.allocate( methodData.computeLength() );
try
{
bb = methodData.encode( bb );
// Check the length
assertEquals( 0x24, bb.limit() );
String encodedPdu = Strings.dumpBytes(bb.array());