@Test
  public void testSubclasses() throws Exception {
    checkClass(new Date());
    checkClass(new Date() {});

    checkClass(new File(""));
    checkClass(new File("") {});

    checkClass(new ArrayList<>());
    checkClass(new ArrayList<Object>() {});

    checkClass(new LinkedList<>());
    checkClass(new LinkedList<Object>() {});

    checkClass(new HashSet<>());
    checkClass(new HashSet<Object>() {});

    checkClass(new HashMap<>());
    checkClass(new HashMap<Object, Object>() {});

    checkClass(new Properties());
    checkClass(new Properties() {});

    checkClass(new Hashtable<>());
    checkClass(new Hashtable<Object, Object>() {});

    checkClass(new Vector<>());
    checkClass(new Vector<Object>() {});

    checkClass(new IdentityHashMap<>());
    checkClass(new IdentityHashMap<Object, Object>() {});

    checkClass(new LinkedHashSet<>());
    checkClass(new LinkedHashSet<Object>() {});

    checkClass(new Stack<>());
    checkClass(new Stack<Object>() {});

    checkClass(new TreeMap<>());
    checkClass(new TreeMap<Object, Object>() {});

    checkClass(new TreeSet<>());
    checkClass(new TreeSet<Object>() {});
  }
Tests that subclasses of well-known data serializer classes are not read back as instances of
their superclass. See bug 32391.

@since GemFire 4.0
geode-core/src/test/java/org/apache/geode/internal/DataSerializableJUnitTest.java