@Test
  public void testIsWellKnownImmutableInstance() {
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance("abc"));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance(0));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance(0L));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance((byte) 0));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance((short) 0));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance((float) 1.2));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance(1.2));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance((char) 0));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance(new BigInteger("1234")));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance(new BigDecimal("123.4556")));
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance(new UUID(1L, 2L)));
    PdxInstance pi = new PdxInstance() {
      @Override
      public Object getObject() {
        return null;
      }

      public Object getObject(Object pdxObject) {
        return null;
      }

      @Override
      public boolean hasField(String fieldName) {
        return false;
      }

      @Override
      public List<String> getFieldNames() {
        return null;
      }

      @Override
      public boolean isIdentityField(String fieldName) {
        return false;
      }

      @Override
      public Object getField(String fieldName) {
        return null;
      }

      @Override
      public WritablePdxInstance createWriter() {
        return null;
      }

      @Override
      public String getClassName() {
        return null;
      }

      @Override
      public boolean isEnum() {
        return false;
      }
    };
    WritablePdxInstance wpi = new WritablePdxInstance() {
      @Override
      public Object getObject() {
        return null;
      }

      public Object getObject(Object pdxObject) {
        return null;
      }

      @Override
      public boolean hasField(String fieldName) {
        return false;
      }

      @Override
      public List<String> getFieldNames() {
        return null;
      }

      @Override
      public boolean isIdentityField(String fieldName) {
        return false;
      }

      @Override
      public Object getField(String fieldName) {
        return null;
      }

      @Override
      public WritablePdxInstance createWriter() {
        return null;
      }

      @Override
      public void setField(String fieldName, Object value) {}

      @Override
      public String getClassName() {
        return null;
      }

      @Override
      public boolean isEnum() {
        return false;
      }
    };
    assertEquals(true, CopyHelper.isWellKnownImmutableInstance(pi));
    assertEquals(false, CopyHelper.isWellKnownImmutableInstance(wpi));
    assertEquals(false, CopyHelper.isWellKnownImmutableInstance(new Object()));
  }
Tests the functionality of the {@link CopyHelper#copy} method and the builtin copy-on-get Cache
functions.

@since GemFire 4.0
geode-core/src/integrationTest/java/org/apache/geode/CopyJUnitTest.java