DirSyncControl extends AbstractControl implements RequestControl, ResponseControl { @Override public void decode(final DERBuffer encoded) { final DERParser parser = new DERParser(); parser.registerHandler(FlagHandler.PATH, new FlagHandler(this)); parser.registerHandler(MaxAttrCountHandler.PATH, new MaxAttrCountHandler(this)); parser.registerHandler(CookieHandler.PATH, new CookieHandler(this)); parser.parse(encoded); } DirSyncControl();  DirSyncControl(final boolean critical);  DirSyncControl(final Flag[] f);  DirSyncControl(final Flag[] f, final boolean critical);  DirSyncControl(final Flag[] f, final int count);  DirSyncControl(final Flag[] f, final int count, final boolean critical);  DirSyncControl(final Flag[] f, final byte[] value, final boolean critical);  DirSyncControl(final Flag[] f, final byte[] value, final int count, final boolean critical); @Override boolean hasValue(); long getFlags(); void setFlags(final long l); int getMaxAttributeCount(); void setMaxAttributeCount(final int count); byte[] getCookie(); void setCookie(final byte[] value); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override byte[] encode(); @Override void decode(final DERBuffer encoded); static final String OID; }
@Test(groups = "control", dataProvider = "request-response") public void decode(final DERBuffer berValue, final DirSyncControl expected) throws Exception { final DirSyncControl actual = new DirSyncControl(expected.getCriticality()); actual.decode(berValue); Assert.assertEquals(actual, expected); }