### Question:
SinglePluginLoader implements PluginLoader { protected InputStream getSource() { if (resource != null) { return ClassLoaderUtils.getResourceAsStream(resource, this.getClass()); } if (url != null) { try { return url.openConnection().getInputStream(); } catch (IOException e) { throw new PluginParseException(e); } } final InputStream inputStream = inputStreamRef.getAndSet(null); if (inputStream != null) { return inputStream; } throw new IllegalStateException("No defined method for getting an input stream."); } SinglePluginLoader(final String resource);  SinglePluginLoader(final URL url);  SinglePluginLoader(final InputStream is); Collection<Plugin> loadAllPlugins(final ModuleDescriptorFactory moduleDescriptorFactory); boolean supportsRemoval(); boolean supportsAddition(); Collection<Plugin> addFoundPlugins(final ModuleDescriptorFactory moduleDescriptorFactory); void removePlugin(final Plugin plugin);  }### Answer:
@Deprecated @Test(expected = IllegalStateException.class) public void testPluginByInputStreamNotReentrant() { final SinglePluginLoader loader = new SinglePluginLoader(ClassLoaderUtils.getResourceAsStream("test-disabled-plugin.xml", SinglePluginLoader.class)); loader.getSource(); loader.getSource(); }