ExtendedTestResource testResource = new ExtendedTestResource();
Serializer<JSONObject> jsonSerializer = new JSONSerializer();
ResourceShape resourceShape = ResourceShapeFactory.createResourceShape(ExtendedTestResource.class, null);
// when
JSONObject jsonObject = jsonSerializer.serialize(testResource, resourceShape);
String jsonString = jsonObject.toString();
jsonObject = new JSONObject(jsonString);
// then
assertEquals(testResource.getName(), jsonObject.getString(TestResource.STRING_PROPERTY_NAME));