### Question:
OsgiPluginInstalledHelper implements OsgiPluginHelper { public <T> T autowire(final Class<T> clazz, final AutowireCapablePlugin.AutowireStrategy autowireStrategy) throws IllegalPluginStateException { assertSpringContextAvailable(); return containerAccessor.createBean(clazz); } OsgiPluginInstalledHelper(final Bundle bundle, final PackageAdmin packageAdmin); Bundle getBundle(); Class<T> loadClass(final String clazz, final Class<?> callingClass); URL getResource(final String name); InputStream getResourceAsStream(final String name); ClassLoader getClassLoader(); Bundle install(); void onEnable(final ServiceTracker... serviceTrackers); void onDisable(); void onUninstall(); T autowire(final Class<T> clazz, final AutowireCapablePlugin.AutowireStrategy autowireStrategy); void autowire(final Object instance, final AutowireCapablePlugin.AutowireStrategy autowireStrategy); Set<String> getRequiredPlugins(); void setPluginContainer(final Object container); ContainerAccessor getContainerAccessor();  }### Answer:
@Test public void testAutowireNoSpringButThereShouldBe() { Object obj = new Object(); try { helper.autowire(obj, AutowireCapablePlugin.AutowireStrategy.AUTOWIRE_AUTODETECT); fail("Should throw exception"); } catch (RuntimeException ignored) { } }