// we instantiate the proxy class using the ReflectionFactory.newConstructorForSerialization() method which allows us to instantiate the
// proxy class without calling the proxy class' constructor. It is in fact using the java.lang.Object constructor so is in effect
// doing what we were doing before.
ReflectionFactory factory = ReflectionFactory.getReflectionFactory();
Constructor<?> constr = Object.class.getConstructor();
Constructor<?> subclassConstructor = factory.newConstructorForSerialization(generatedProxySubclass, constr);
proxySubclassInstance = subclassConstructor.newInstance();
Method setIHMethod = proxySubclassInstance.getClass().getMethod("setInvocationHandler", InvocationHandler.class);
setIHMethod.invoke(proxySubclassInstance, ih);
LOGGER.debug("Invoked proxy subclass constructor");