Plugin pluginFromFactory = mock(Plugin.class);
when(pluginFromFactory.getId()).thenReturn(_id);
when(_factory.createInstance(_id, _attributes, _broker)).thenReturn(pluginFromFactory);
PluginRecoverer pluginRecoverer = new PluginRecoverer(_pluginFactoryServiceLoader);
ConfiguredObject pluginFromRecoverer = pluginRecoverer.create(null, _configurationEntry, _broker);
assertNotNull("Null group provider", pluginFromRecoverer);
assertSame("Unexpected plugin", pluginFromFactory, pluginFromRecoverer);
assertEquals("Unexpected ID", _id, pluginFromRecoverer.getId());
}