@Test
public void testBytecode() throws ParseException
{
String value = null;
LdapComparatorDescription ldapComparatorDescription = null;
// FQCN simple p
value = "( 1.1 FQCN org.apache.directory.SimpleComparator BYTECODE ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789==== )";
ldapComparatorDescription = parser.parseComparatorDescription( value );
assertNotNull( ldapComparatorDescription.getBytecode() );
assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
.getBytecode() );
// FQCN simple, no spaces
value = "(1.1 FQCNorg.apache.directory.SimpleComparator BYTECODEABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====)";
ldapComparatorDescription = parser.parseComparatorDescription( value );
assertNotNull( ldapComparatorDescription.getBytecode() );
assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
.getBytecode() );
// FQCN simple, tabs
value = "\t(\t1.1\tFQCN\torg.apache.directory.SimpleComparator\tBYTECODE\tABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====\t)\t";
ldapComparatorDescription = parser.parseComparatorDescription( value );
assertNotNull( ldapComparatorDescription.getBytecode() );
assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
.getBytecode() );
}