final Map<String,Object> attributes = new HashMap<>();
attributes.put("test", "that");
attributes.put("two", 2);
final ResponseMessage response = ResponseMessage.build(id)
.responseMetaData(metaData)
.code(ResponseStatusCode.SUCCESS)
.result("some-result")
.statusAttributes(attributes)
.statusMessage("worked")
.create();
final String results = SERIALIZER.serializeResponseAsString(response);
final ResponseMessage deserialized = SERIALIZER.deserializeResponse(results);
assertEquals(id, deserialized.getRequestId());
assertEquals("this", deserialized.getResult().getMeta().get("test"));
assertEquals(1, deserialized.getResult().getMeta().get("one"));
assertEquals("some-result", deserialized.getResult().getData());
assertEquals("that", deserialized.getStatus().getAttributes().get("test"));
assertEquals(2, deserialized.getStatus().getAttributes().get("two"));
assertEquals(ResponseStatusCode.SUCCESS.getValue(), deserialized.getStatus().getCode().getValue());
assertEquals("worked", deserialized.getStatus().getMessage());
}