public void testDecodeControlLegacyDNValue()
throws Exception
{
ByteString innerValue = ByteString.valueOf("dn:uid=test,o=test");
ByteStringBuilder bsb = new ByteStringBuilder();
ASN1Writer writer = ASN1.getWriter(bsb);
writer.writeOctetString(innerValue);
ByteString outerValue = bsb.toByteString();
LDAPControl c = new LDAPControl(OID_PROXIED_AUTH_V2, true, outerValue);
ProxiedAuthV2Control proxyControl = ProxiedAuthV2Control.DECODER.decode(c.isCritical(), c.getValue());
assertEquals(proxyControl.getAuthorizationID(), innerValue);