@Test public void serializeTest() { RegisteredMessage registeredMessage = new RegisteredMessage(11, 127172L); assertThat(registeredMessage.getCode()).isEqualTo(65); assertThat(registeredMessage.getRequestId()).isEqualTo(11); assertThat(registeredMessage.getRegistrationId()).isEqualTo(127172L); String json = serializeToJson(registeredMessage); assertThat(json).isEqualTo("[65,11,127172]"); }
@Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); }
RegisteredMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); } }
RegisteredMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); } RegisteredMessage(long requestId, long registrationId);  RegisteredMessage(RegisterMessage registerMessage, long registrationId); }
RegisteredMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); } RegisteredMessage(long requestId, long registrationId);  RegisteredMessage(RegisterMessage registerMessage, long registrationId); static RegisteredMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getRegistrationId(); @Override String toString(); }
RegisteredMessage extends WampMessage { @Override public void serialize(JsonGenerator generator) throws IOException { generator.writeNumber(getCode()); generator.writeNumber(this.requestId); generator.writeNumber(this.registrationId); } RegisteredMessage(long requestId, long registrationId);  RegisteredMessage(RegisterMessage registerMessage, long registrationId); static RegisteredMessage deserialize(JsonParser jp); @Override void serialize(JsonGenerator generator); long getRequestId(); long getRegistrationId(); @Override String toString();  }