@Test
  public void copyAndReleaseWithNullReturnsNull() {
    Object testObject = null;
    Object returnObject = OffHeapHelper.copyAndReleaseIfNeeded(testObject, null);
    assertThat(returnObject, is(equalTo(null)));
  }
Extracted from JUnit setUp() to reduce test overhead for cases where offheap memory isn't
needed.
geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapHelperJUnitTest.java