@Test
  public void testSerializables() throws Exception {
    System.out.println(testName.getMethodName() + " starting");
    findClasses();
    loadExpectedSerializables();

    File actualSerializablesFile = createEmptyFile(ACTUAL_SERIALIZABLES_DAT);
    System.out.println(testName.getMethodName() + " actualSerializablesFile="
        + actualSerializablesFile.getAbsolutePath());

    List<ClassAndVariables> actualSerializables = findSerializables();
    CompiledClassUtils.storeClassesAndVariables(actualSerializables, actualSerializablesFile);

    String diff = CompiledClassUtils
        .diffSortedClassesAndVariables(expectedSerializables, actualSerializables);
    if (!diff.isEmpty()) {
      System.out.println(
          "++++++++++++++++++++++++++++++testSerializables found discrepancies++++++++++++++++++++++++++++++++++++");
      System.out.println(diff);

      String codeAnalysisPackageDir = getPackageDirForClass(getClass());
      Path excludedClassesSourceFile = INTEGRATION_TEST_RESOURCES_SOURCE_ROOT
          .resolve(codeAnalysisPackageDir)
          .resolve(EXCLUDED_CLASSES_TXT);

      String failureMessage = getModuleClass()
          .map(clazz -> failWithServiceMessage(
              actualSerializablesFile, diff, excludedClassesSourceFile, clazz))
          .orElse(failWithoutServiceMessage(
              diff, excludedClassesSourceFile));

      fail(failureMessage);
    }
  }
This subclass of AbstractAnalyzeSerializablesTestBase uses DataSerializer and
InternalDataSerializer. It also performs initialization of the Geode TypeRegistry
geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesTestBase.java