JsonObject packet = new JsonObject();
packet.putString("type", "event");
packet.putString("name", "hello");
JsonArray args = new JsonArray();
args.addString("whiteship");
args.addObject(new JsonObject().putString("first name", "keesun"));
packet.putArray("args", args);
String encodedString = parser.encodePacket(packet);
assertThat(encodedString.contains("hello"), is(true));
assertThat(encodedString.contains("whiteship"), is(true));