Assert.assertTrue(obj instanceof JsonObject);
JsonObject o = (JsonObject)obj;
Assert.assertTrue(o.has("fieldName"));
Assert.assertEquals(new JsonPrimitive("epsilon"), o.get("fieldName"));
Assert.assertTrue(o.has("owner"));
Assert.assertEquals(new JsonPrimitive("test_data"), o.get("owner"));
Assert.assertTrue(o.has("type"));
Assert.assertEquals(new JsonPrimitive("number"), o.get("type"));
Assert.assertTrue(o.has("label"));
Assert.assertEquals(new JsonPrimitive("My Label"), o.get("label"));
Assert.assertTrue(o.has("display"));
Assert.assertEquals(new JsonPrimitive("ranges"), o.get("display"));
JsonObject ranges = new JsonObject();
ranges.add("start", new JsonPrimitive(0));
ranges.add("end", new JsonPrimitive(100));
ranges.add("size", new JsonPrimitive(20));
ranges.add("maxNumberOf", new JsonPrimitive(5));
Assert.assertTrue(o.has("ranges"));
Assert.assertEquals(ranges, o.get("ranges"));
}
}