@Test
  public void testCyclicCollectionWithMultipleObjects() throws Exception {
    for (int orderIndex = 1; orderIndex <= 5; orderIndex++) {
      Collection<Item> items = new ArrayList<>();
      Order order = new Order("ORDER_TEST_" + orderIndex, items);

      for (int subOrderIndex = 1; subOrderIndex <= 5; subOrderIndex++) {
        Order subOrder = new Order();
        subOrder.setId("ORDER_ID_" + subOrderIndex);
        subOrder.setItems(items);

        Item item = new Item(subOrder, "ID_" + subOrderIndex, "Book");
        order.addItem(item);
      }

      region.put("items_" + orderIndex, items);
    }

    String queryResult = queryEngine.queryForJsonResult(QUERY_1, 0, queryResultSetLimit,
        queryCollectionsDepth);
    System.out.println("Query Result: " + queryResult);

    // 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