SyncStateControl extends AbstractControl implements ResponseControl { @Override public void decode(final DERBuffer encoded) { final DERParser parser = new DERParser(); parser.registerHandler(StateHandler.PATH, new StateHandler(this)); parser.registerHandler(EntryUuidHandler.PATH, new EntryUuidHandler(this)); parser.registerHandler(CookieHandler.PATH, new CookieHandler(this)); parser.parse(encoded); } SyncStateControl();  SyncStateControl(final boolean critical);  SyncStateControl(final State state);  SyncStateControl(final State state, final boolean critical);  SyncStateControl(final State state, final UUID uuid, final boolean critical);  SyncStateControl(final State state, final UUID uuid, final byte[] value, final boolean critical); State getSyncState(); void setSyncState(final State state); UUID getEntryUuid(); void setEntryUuid(final UUID uuid); byte[] getCookie(); void setCookie(final byte[] value); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override void decode(final DERBuffer encoded); static final String OID; }
@Test(groups = "control", dataProvider = "response") public void decode(final DERBuffer berValue, final SyncStateControl expected) throws Exception { final SyncStateControl actual = new SyncStateControl(expected.getCriticality()); actual.decode(berValue); Assert.assertEquals(actual, expected); }