}
settings.setMockName(new MockNameImpl(mockName));
settings.setTypeToMock(type);
InternalMockHandler mockHandler = new MockHandlerFactory().create(settings);
MethodInterceptorFilter filter = new PowerMockMethodInterceptorFilter(mockHandler, settings);
final T mock = (T) ClassImposterizer.INSTANCE.imposterise(filter, type);
final MockitoMethodInvocationControl invocationControl = new MockitoMethodInvocationControl(filter,
isSpy && delegator == null ? new Object() : delegator, mock, methods);