@Test public void serializeTest() { SubscribedMessage subscribedMessage = new SubscribedMessage(1, 2); assertThat(subscribedMessage.getCode()).isEqualTo(33); assertThat(subscribedMessage.getRequestId()).isEqualTo(1); assertThat(subscribedMessage.getSubscriptionId()).isEqualTo(2); String json = serializeToJson(subscribedMessage); assertThat(json).isEqualTo("[33,1,2]"); }
@Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.subscriptionId); }
SubscribedMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.subscriptionId); } }
SubscribedMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.subscriptionId); } SubscribedMessage(long requestId, long subscriptionId);  SubscribedMessage(SubscribeMessage subscribeMessage, long subscriptionId); }
SubscribedMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.subscriptionId); } SubscribedMessage(long requestId, long subscriptionId);  SubscribedMessage(SubscribeMessage subscribeMessage, long subscriptionId); static SubscribedMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getSubscriptionId(); @Override String toString(); }
SubscribedMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.subscriptionId); } SubscribedMessage(long requestId, long subscriptionId);  SubscribedMessage(SubscribeMessage subscribeMessage, long subscriptionId); static SubscribedMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getSubscriptionId(); @Override String toString();  }