// TODO check the class is mockable in the deserialization side
// ClassImposterizer.INSTANCE.canImposterise(typeToMock);
// create the Mockito mock class before it can even be deserialized
//TODO SF unify creation of imposterizer, constructor code duplicated, pulling in CreationSettings internal class
ClassImposterizer imposterizer = new ClassImposterizer(new InstantiatorProvider().getInstantiator(new CreationSettings()));
imposterizer.setConstructorsAccessible(typeToMock, true);
Class<?> proxyClass = imposterizer.createProxyClass(
typeToMock,
extraInterfaces.toArray(new Class[extraInterfaces.size()])
);