PluginMechanism pluginMechanism = mock(PluginMechanism.class);
Set<Class<? extends Acceptor>> acceptorClasses = new HashSet<Class<? extends Acceptor>>();
acceptorClasses.add(MockAcceptor.class);
when(pluginMechanism.loadTypes(Acceptor.class))
.thenReturn(acceptorClasses);
Set<Class<? extends Action>> actionClasses = new HashSet<Class<? extends Action>>();
actionClasses.add(MockAction.class);