@Test
public void testFromJsonObject() {

	JsonArrayBuilder array = Json.createArrayBuilder();
	for (Pose p : p1.getPoses()) {
		array.add(p.toJsonObject());
	}
	JsonObject jsonObject = Json.createObjectBuilder()
			.add(PoseArray.FIELD_HEADER, p1.getHeader().toJsonObject())
			.add(PoseArray.FIELD_POSES, array.build()).build();
	PoseArray p = PoseArray.fromJsonObject(jsonObject);
	assertEquals(p1.toString(), p.toString());
	assertEquals(p1.toJsonObject(), p.toJsonObject());
	assertEquals(p1.getMessageType(), p.getMessageType());
	assertEquals(p1.size(), p.size());
	assertEquals(p1.getHeader(), p.getHeader());
	assertTrue(Arrays.deepEquals(p1.getPoses(), p.getPoses()));
	assertNotSame(p1, p);
	assertNotSame(p1.toString(), p.toString());
	assertNotSame(p1.toJsonObject(), p.toJsonObject());
}