@Test(description = "it should create a model with example") public void createModelWithExample() { ObjectSchema model = new ObjectSchema(); model.addProperties("name", new StringSchema().example("Tony")); model.addProperties("id", new IntegerSchema().example(123)); model.example("{\"name\":\"Fred\",\"id\":123456\"}"); assertEquals(model.getExample(), "{\"name\":\"Fred\",\"id\":123456\"}"); } }