@Test(dataProvider = "response") public void encode(final byte[] berValue, final SyncInfoMessage response) throws Exception { final SyncInfoMessage info = new SyncInfoMessage(); info.getResponseValueParseHandler().handle(null, new DefaultDERBuffer(berValue)); Assert.assertEquals(info, response); }
@Override protected ParseHandler getResponseValueParseHandler() { return (parser, encoded) -> { final DERParser p = new DERParser(); p.registerHandler(NEW_COOKIE_PATH, new NewCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_PATH, new RefreshDeleteHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_COOKIE_PATH, new RefreshDeleteCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_DONE_PATH, new RefreshDeleteDoneHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_PATH, new RefreshPresentHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_COOKIE_PATH, new RefreshPresentCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_DONE_PATH, new RefreshPresentDoneHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_PATH, new SyncIdSetHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_COOKIE_PATH, new SyncIdSetCookieHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_DELETES_PATH, new SyncIdSetDeletesHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_UUIDS_PATH, new SyncIdSetUuidsHandler(SyncInfoMessage.this)); p.parse(encoded); }; }
SyncInfoMessage extends IntermediateResponse { @Override protected ParseHandler getResponseValueParseHandler() { return (parser, encoded) -> { final DERParser p = new DERParser(); p.registerHandler(NEW_COOKIE_PATH, new NewCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_PATH, new RefreshDeleteHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_COOKIE_PATH, new RefreshDeleteCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_DONE_PATH, new RefreshDeleteDoneHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_PATH, new RefreshPresentHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_COOKIE_PATH, new RefreshPresentCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_DONE_PATH, new RefreshPresentDoneHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_PATH, new SyncIdSetHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_COOKIE_PATH, new SyncIdSetCookieHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_DELETES_PATH, new SyncIdSetDeletesHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_UUIDS_PATH, new SyncIdSetUuidsHandler(SyncInfoMessage.this)); p.parse(encoded); }; } }
SyncInfoMessage extends IntermediateResponse { @Override protected ParseHandler getResponseValueParseHandler() { return (parser, encoded) -> { final DERParser p = new DERParser(); p.registerHandler(NEW_COOKIE_PATH, new NewCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_PATH, new RefreshDeleteHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_COOKIE_PATH, new RefreshDeleteCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_DONE_PATH, new RefreshDeleteDoneHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_PATH, new RefreshPresentHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_COOKIE_PATH, new RefreshPresentCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_DONE_PATH, new RefreshPresentDoneHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_PATH, new SyncIdSetHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_COOKIE_PATH, new SyncIdSetCookieHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_DELETES_PATH, new SyncIdSetDeletesHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_UUIDS_PATH, new SyncIdSetUuidsHandler(SyncInfoMessage.this)); p.parse(encoded); }; } protected  SyncInfoMessage();  SyncInfoMessage(final DERBuffer buffer); }
SyncInfoMessage extends IntermediateResponse { @Override protected ParseHandler getResponseValueParseHandler() { return (parser, encoded) -> { final DERParser p = new DERParser(); p.registerHandler(NEW_COOKIE_PATH, new NewCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_PATH, new RefreshDeleteHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_COOKIE_PATH, new RefreshDeleteCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_DONE_PATH, new RefreshDeleteDoneHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_PATH, new RefreshPresentHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_COOKIE_PATH, new RefreshPresentCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_DONE_PATH, new RefreshPresentDoneHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_PATH, new SyncIdSetHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_COOKIE_PATH, new SyncIdSetCookieHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_DELETES_PATH, new SyncIdSetDeletesHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_UUIDS_PATH, new SyncIdSetUuidsHandler(SyncInfoMessage.this)); p.parse(encoded); }; } protected  SyncInfoMessage();  SyncInfoMessage(final DERBuffer buffer); Type getMessageType(); void setMessageType(final Type type); byte[] getCookie(); void setCookie(final byte[] value); boolean getRefreshDone(); void setRefreshDone(final boolean b); boolean getRefreshDeletes(); void setRefreshDeletes(final boolean b); Set<UUID> getEntryUuids(); void addEntryUuids(final UUID... uuids); void setEntryUuids(final Set<UUID> uuids); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static Builder builder(); }
SyncInfoMessage extends IntermediateResponse { @Override protected ParseHandler getResponseValueParseHandler() { return (parser, encoded) -> { final DERParser p = new DERParser(); p.registerHandler(NEW_COOKIE_PATH, new NewCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_PATH, new RefreshDeleteHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_COOKIE_PATH, new RefreshDeleteCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_DELETE_DONE_PATH, new RefreshDeleteDoneHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_PATH, new RefreshPresentHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_COOKIE_PATH, new RefreshPresentCookieHandler(SyncInfoMessage.this)); p.registerHandler(REFRESH_PRESENT_DONE_PATH, new RefreshPresentDoneHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_PATH, new SyncIdSetHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_COOKIE_PATH, new SyncIdSetCookieHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_DELETES_PATH, new SyncIdSetDeletesHandler(SyncInfoMessage.this)); p.registerHandler(SYNC_ID_SET_UUIDS_PATH, new SyncIdSetUuidsHandler(SyncInfoMessage.this)); p.parse(encoded); }; } protected  SyncInfoMessage();  SyncInfoMessage(final DERBuffer buffer); Type getMessageType(); void setMessageType(final Type type); byte[] getCookie(); void setCookie(final byte[] value); boolean getRefreshDone(); void setRefreshDone(final boolean b); boolean getRefreshDeletes(); void setRefreshDeletes(final boolean b); Set<UUID> getEntryUuids(); void addEntryUuids(final UUID... uuids); void setEntryUuids(final Set<UUID> uuids); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static Builder builder(); static final String OID; }