// Test encode/decode
ByteStringBuilder bsb = new ByteStringBuilder();
ASN1Writer writer = ASN1.getWriter(bsb);
bsb.clear();
eclrc.write(writer);
LDAPControl control = LDAPReader.readControl(ASN1.getReader(bsb));
eclrc =
ExternalChangelogRequestControl.DECODER.decode(control.isCritical(), control.getValue());
assertNotNull(eclrc);
assertEquals(critical, eclrc.isCritical());
assertEquals(OID_ECL_COOKIE_EXCHANGE_CONTROL, eclrc.getOID());
assertTrue(eclrc.getCookie().equalsTo(mdss),
"Expect:"+value+", Got:"+eclrc.getCookie().toString());