diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java index e4a9e8440107..9e8b98664252 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java @@ -66,5 +66,8 @@ public void testPet() { model2.setName("Dog"); Assert.assertTrue(model.equals(model2)); + + // test toJson, shouldn't throw exception + String test = model.toJson(); } }