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
}
	private static Object createMock(Class interfaceType, boolean ordered,
			EqualityComparator equalityComparator) {
		if (!interfaceType.isInterface()) {
			throw new IllegalArgumentException();
		}
		MockInvocationHandler mockInvocationHandler = new MockInvocationHandler(
				ordered, equalityComparator);
		Object newProxyInstance = Proxy.newProxyInstance(Mocks.class
				.getClassLoader(), new Class[] { interfaceType, Mock.class },
				mockInvocationHandler);
		return newProxyInstance;
	}
	public static void startChecking(Object mock) {
		getMockInvocationHandler(mock).replay();
	}
	public static void verify(Object mock) {
		getMockInvocationHandler(mock).verify();
	}
	public static void reset(Object mock) {
		getMockInvocationHandler(mock).reset();
	}
	private static MockInvocationHandler getMockInvocationHandler(Object mock) {
		return ((Mock) mock).getMockInvocationHandler();
	}
	public static void setLastReturnValue(Object mock, Object object) {
		getMockInvocationHandler(mock).setLastReturnValue(object);
	}
}