@Test
  public void handlesClassFromOtherClassLoader() throws Exception {
    Class loadedClass = Class.forName(CLASS_NAME_SERIALIZABLE_IMPL, true,
        Thread.currentThread().getContextClassLoader());

    Object instance = loadedClass.newInstance();
    byte[] bytes = BlobHelper.serializeToBlob(instance);

    Object object = BlobHelper.deserializeBlob(bytes);

    assertThat(object).isNotNull();
    assertThat(object.getClass().getName()).isEqualTo(CLASS_NAME_SERIALIZABLE_IMPL);
    assertThat(object instanceof Serializable);

    Class deserializedClass = object.getClass();
    assertThat(deserializedClass.getInterfaces()).contains(Serializable.class);
  }
Tests serializing an object loaded with the current context class loader (whose parent is the
loader that loads GemFire and test classes).
geode-core/src/test/java/org/apache/geode/internal/util/BlobHelperWithThreadContextClassLoaderTest.java