### Question:
CommandInvocationHandler implements InvocationHandler { public static boolean isEventSubscription(Method method) { String name = method.getName(); Parameter[] parameters = method.getParameters(); return name.startsWith(EVENT_LISTENER_PREFIX) && EventListener.class.equals(method.getReturnType()) && (parameters != null && parameters.length == 1 && EventHandler.class.isAssignableFrom(parameters[0].getType())); }  void setChromeDevToolsService(ChromeDevToolsService chromeDevToolsService); @Override Object invoke(Object unused, Method method, Object[] args); static boolean isEventSubscription(Method method);  }### Answer:
@Test public void testIsEventSubscription() { assertFalse(CommandInvocationHandler.isEventSubscription(getMethodByName("voidMethod"))); assertFalse( CommandInvocationHandler.isEventSubscription(getMethodByName("stringMethodWithParams"))); assertFalse( CommandInvocationHandler.isEventSubscription(getMethodByName("onEventListenerTestMethod"))); assertFalse( CommandInvocationHandler.isEventSubscription( getMethodByName("onEventListenerTestMethod1"))); assertFalse( CommandInvocationHandler.isEventSubscription( getMethodByName("onEventListenerTestMethod2"))); assertFalse( CommandInvocationHandler.isEventSubscription( getMethodByName("onEventListenerTestMethod3"))); assertTrue( CommandInvocationHandler.isEventSubscription( getMethodByName("onEventListenerTestMethod4"))); }