MethodServices { public Method getNonProxiedMethod(Class cls, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException { return cls.getMethod(methodName, parameterTypes); }  Method getMethodFromDataService(final Class dsClass, final MessageFromClient message, List<Object> arguments); Method getNonProxiedMethod(Class cls, String methodName, Class<?>... parameterTypes);  }
@Test public void testGetNonProxiedMethod() throws NoSuchMethodException { System.out.println("getNonProxiedMethod"); Method m = instance.getNonProxiedMethod(Result.class, "getInteger"); assertThat(m).isNotNull(); m = instance.getNonProxiedMethod(Result.class, "setInteger", Integer.TYPE); assertThat(m).isNotNull(); }
@Test(expected = NoSuchMethodException.class) public void testGetNonProxiedMethodFailed() throws NoSuchMethodException { System.out.println("getNonProxiedMethod"); Method m = instance.getNonProxiedMethod(Result.class, "unknownMethod"); }