@Override
  public Object copy(Object value) {
    Class<?>[] interfaces = value.getClass().getInterfaces();
    InvocationHandler invocationHandler = Proxy.getInvocationHandler(value);
    Preconditions.checkNotNull(interfaces);
    Preconditions.checkNotNull(invocationHandler);
    Object proxy = Proxy.newProxyInstance(fury.getClassLoader(), interfaces, STUB_HANDLER);
    if (needToCopyRef) {
      fury.reference(value, proxy);
    }
    Platform.putObject(proxy, PROXY_HANDLER_FIELD_OFFSET, fury.copyObject(invocationHandler));
    return proxy;
  }
@Test(dataProvider = "furyCopyConfig")
  public void testJdkProxyRef(Fury fury) {
    RefTestInvocationHandler hdlr = new RefTestInvocationHandler();
    Function function =
        (Function)
            Proxy.newProxyInstance(fury.getClassLoader(), new Class[] {Function.class}, hdlr);
    hdlr.setProxy(function);
    assertEquals(hdlr.getProxy(), function);

    Function copy = fury.copy(function);
    RefTestInvocationHandler copyHandler =
        (RefTestInvocationHandler) Proxy.getInvocationHandler(copy);
    assertEquals(copyHandler.getProxy(), copy);
  }