final Class<?>[] proxiedClasses = prepend(mockedType, ancilliaryTypes);
final ClassLoader classLoader = SearchingClassLoader.combineLoadersOf(proxiedClasses);
return (T)Proxy.newProxyInstance(classLoader, proxiedClasses, new InvocationHandler() {
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return mockObject.invoke(new Invocation(proxy, method, args));
}
});
}