@Test
public void testFromJsonObject() {

	JsonArrayBuilder array = Json.createArrayBuilder();
	for (MultiArrayDimension p : m1.getDim()) {
		array.add(p.toJsonObject());
	}
	JsonObject jsonObject = Json.createObjectBuilder()
			.add(MultiArrayLayout.FIELD_DIM, array.build())
			.add(MultiArrayLayout.FIELD_DATA_OFFSET, m1.getDataOffset())
			.build();
	MultiArrayLayout p = MultiArrayLayout.fromJsonObject(jsonObject);
	assertEquals(m1.toString(), p.toString());
	assertEquals(m1.toJsonObject(), p.toJsonObject());
	assertEquals(m1.getMessageType(), p.getMessageType());
	assertTrue(Arrays.deepEquals(m1.getDim(), p.getDim()));
	assertEquals(m1.getDataOffset(), p.getDataOffset());
	assertNotSame(m1, p);
	assertNotSame(m1.toString(), p.toString());
	assertNotSame(m1.toJsonObject(), p.toJsonObject());
	assertEquals(m1.size(), p.size());
}