Bug 146435 [DataBinding] Mocks InvocationHandler throws an exception when returning primitive type
The InvocationHandler in the Mocks class attempts to return a new type via Class.newInstance for primitives which throws an InstantiationException.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/util/Mocks.java
int indexOfMethodCall = previousCallHistory.indexOf(methodCall);
				if (indexOfMethodCall != -1) {
					
					methodCall.setReturnValue(((MethodCall) previousCallHistory
							.get(indexOfMethodCall)).getReturnValue());
				} else {
					throw new AssertionFailedError("unexpected method call: "
							+ method.getName());
				}
				if (ordered) {
					if (previousCallHistory.size() <= currentCallHistory.size()) {
						throw new AssertionFailedError("extra method call: "
								+ method.getName());
					}
					MethodCall previousCall = (MethodCall) previousCallHistory
							.get(currentCallHistory.size());
					if (!methodCall.equals(previousCall)) {
						throw new AssertionFailedError(
								"different method call (expected:"
										+ previousCall.method.getName()
										+ ", actual:" + method.getName() + ")");
					}
				}
			}
			currentCallHistory.add(methodCall);
			Class returnType = method.getReturnType();
			if (returnType.isPrimitive() && void.class != returnType) {
				return returnType.newInstance();
			}
			return methodCall.getReturnValue();