@Test
  public void testImplementsDataSerializable() throws Exception {
    Class[] classes = new Class[] {SortedResultSet.class, ResultsCollectionWrapper.class,
        ResultsSet.class, SortedStructSet.class, StructImpl.class, StructSet.class, Undefined.class,
        // QRegion.class, // QRegions remain unserializable
        CollectionTypeImpl.class, MapTypeImpl.class, ObjectTypeImpl.class, StructTypeImpl.class,};

    List list = new ArrayList();
    for (Class nextClass : classes) {
      if (!DataSerializable.class.isAssignableFrom(nextClass)) {
        if (!DataSerializableFixedID.class.isAssignableFrom(nextClass)) {
          list.add(nextClass.getName());
        }
      }
    }

    assertTrue(list + " are not DataSerializable", list.isEmpty());
  }
Test whether query results are DataSerializable
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/ResultsDataSerializabilityJUnitTest.java