Try this:
PrivilegedAccessor.invokeMethod(InsuranceRetriever,
"getInsurance", new Object[] { code },
new Class[] { Long.TYPE });
Explanation:
The class objects for the primitive types are found under the TYPE static final constant in each of the java.lang objects for each of the primitive types. Boolean.TYPE
, Integer.TYPE
, Byte.TYPE
, Short.TYPE
, Long.TYPE
etc.