### Question:
ServiceHelper { public static Object execute(Service service, String method) throws ServiceMethodNotFoundException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { return execute(service, method, new Object[0]); }  static Class<?> getWrapperClass(Class<?> c); static boolean isWrapperClass(Class<?> c); static boolean isSubclass(Class<?> subClass, Class<?> superClass); static Class<?> getUnwrappedClass(Class<?> c); static Object execute(Service service, String method); static Object execute(Service service, String method, Object... parameters); static Method searchMethod(Class<? extends Service> serviceClass, String methodName, Object[] params); static String getParameterString(Object[] params);  }### Answer:
@Test public void testInvocation() throws SecurityException, IllegalArgumentException, ServiceMethodNotFoundException, IllegalAccessException, InvocationTargetException, InternalSecurityException { TestService testee = new TestService(); assertEquals(10, ServiceHelper.execute(testee, "getInt")); assertEquals(4, ServiceHelper.execute(testee, "inc", 2)); assertEquals(4, ServiceHelper.execute(testee, "inc", new Integer(2))); }
@Test public void testSubclassParam() throws SecurityException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, InternalSecurityException, ServiceMethodNotFoundException { TestService testee = new TestService(); assertEquals("testnachricht", ServiceHelper.execute(testee, "subclass", new SecurityException("testnachricht"))); }
@Test public void testExceptions() throws SecurityException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, InternalSecurityException { TestService testee = new TestService(); try { ServiceHelper.execute(testee, "privateMethod"); fail("ServiceMethodNotFoundException expected"); } catch (ServiceMethodNotFoundException e) { } try { ServiceHelper.execute(testee, "protectedMethod"); fail("ServiceMethodNotFoundException expected"); } catch (ServiceMethodNotFoundException e) { } try { ServiceHelper.execute(testee, "staticMethod"); fail("ServiceMethodNotFoundException expected"); } catch (ServiceMethodNotFoundException e) { } }