@Test public void testDelegateToInterface() { Runnable wrapped = mock(Runnable.class); PluginClassImplementation impl = new PluginClassImplementation(classFinder(Runnable.class), new MyRunnable(wrapped)); Runnable instance = (Runnable)impl.tryGetAsPluginClass(); verifyRunForwarded(instance, wrapped); }
public Object tryGetAsPluginClass() { return instanceRef.get(); }
PluginClassImplementation { public Object tryGetAsPluginClass() { return instanceRef.get(); } }
PluginClassImplementation { public Object tryGetAsPluginClass() { return instanceRef.get(); } PluginClassImplementation(
            ClassFinder type,
            Object delegateInstance);  PluginClassImplementation(
            ClassFinder type,
            Object delegateInstance,
            InvocationHandlerFactory exceptionalCases); private  PluginClassImplementation(
            ClassFinder type,
            InvocationHandler invocationHandler); }
PluginClassImplementation { public Object tryGetAsPluginClass() { return instanceRef.get(); } PluginClassImplementation(
            ClassFinder type,
            Object delegateInstance);  PluginClassImplementation(
            ClassFinder type,
            Object delegateInstance,
            InvocationHandlerFactory exceptionalCases); private  PluginClassImplementation(
            ClassFinder type,
            InvocationHandler invocationHandler); Object tryGetAsPluginClass(); }
PluginClassImplementation { public Object tryGetAsPluginClass() { return instanceRef.get(); } PluginClassImplementation(
            ClassFinder type,
            Object delegateInstance);  PluginClassImplementation(
            ClassFinder type,
            Object delegateInstance,
            InvocationHandlerFactory exceptionalCases); private  PluginClassImplementation(
            ClassFinder type,
            InvocationHandler invocationHandler); Object tryGetAsPluginClass();  }