} else if (returnType.isArray()) {
return Array.newInstance(returnType.getComponentType(), 0);
} else if (returnType.isInterface()) {
CoreMock nullMock = new CoreMock(returnType, "null" + Formatting.classShortName(returnType));
nullMock.setDefaultStub(this);
return nullMock.proxy();
} else {
throw new AssertionFailedError(createErrorMessage(invocation));
}
}