@Test
  public void testNestedPDXObject() throws Exception {
    PdxInstanceFactory factory = PdxInstanceFactoryImpl.newCreator("Portfolio", false,
        (InternalCache) region.getRegionService());

    factory.writeInt("ID", 111);
    factory.writeString("status", "active");
    factory.writeString("secId", "IBM");

    PdxInstance pdxInstance = factory.create();

    region.put("port", pdxInstance);

    String queryResult = queryEngine.queryForJsonResult(QUERY_1, 0, queryResultSetLimit,
        queryCollectionsDepth);
    String expectedResult =
        "{\"result\":[[\"org.apache.geode.pdx.PdxInstance\",{\"ID\":[\"java.lang.Integer\",111],\"status\":[\"java.lang.String\",\"active\"],\"secId\":[\"java.lang.String\",\"IBM\"]}]]}";
    assertThat(queryResult).isEqualToIgnoringWhitespace(expectedResult);

    // If not correct JSON format this will throw a JSONException
    new ObjectMapper().readTree(queryResult);
  }
Tests a model where Objects have a circular reference with their class types. e.g. Order1--
Has--> Items each Item --Has --> OrderN where (OrderN != Order1)
geode-core/src/integrationTest/java/org/apache/geode/management/DataQueryEngineIntegrationTest.java