@Test public void serializeTest() { PublishedMessage publishedMessage = new PublishedMessage(44, 121); assertThat(publishedMessage.getCode()).isEqualTo(17); assertThat(publishedMessage.getRequestId()).isEqualTo(44); assertThat(publishedMessage.getPublicationId()).isEqualTo(121); String json = serializeToJson(publishedMessage); assertThat(json).isEqualTo("[17,44,121]"); }
@Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.publicationId); }
PublishedMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.publicationId); } }
PublishedMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.publicationId); } PublishedMessage(long requestId, long publicationId);  PublishedMessage(PublishMessage publishMessage, long publicationId); }
PublishedMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.publicationId); } PublishedMessage(long requestId, long publicationId);  PublishedMessage(PublishMessage publishMessage, long publicationId); static PublishedMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getPublicationId(); @Override String toString(); }
PublishedMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.publicationId); } PublishedMessage(long requestId, long publicationId);  PublishedMessage(PublishMessage publishMessage, long publicationId); static PublishedMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getPublicationId(); @Override String toString();  }