### Question:
SunshowerKernel implements Kernel, EventSource { @Override @SneakyThrows public void start() { serviceRegistry.initialize(this); eventDispatcher.start(); lifecycle.start().toCompletableFuture().get(); } @Inject  SunshowerKernel(
      ModuleManager moduleManager,
      ServiceRegistry registry,
      Scheduler<String> scheduler,
      ClassLoader parentClassloader);  SunshowerKernel(
      ModuleManager moduleManager, ServiceRegistry registry, Scheduler<String> scheduler); @NonNull static KernelOptions getKernelOptions(); static void setKernelOptions(KernelOptions options); @Override VolatileStorage getVolatileStorage(); @Override ServiceRegistry getServiceRegistry(); @Override List<KernelModuleEntry> getKernelModules(); @Override KernelLifecycle getLifecycle(); @Override ClassLoader getClassLoader(); void setClassLoader(KernelClassloader loader); @Override @SuppressWarnings("PMD.DataflowAnomalyAnalysis") List<T> locateServices(Class<T> type); @Override @SneakyThrows void start(); @Override void reload(); @Override @SneakyThrows void stop(); @Override ModuleClasspathManager getModuleClasspathManager(); @Override Scheduler<String> getScheduler(); @Override ModuleContext createContext(Module module, VolatileStorage storage); @Override Memento save(); @Override CompletionStage<Void> persistState(); @Override CompletionStage<Void> restoreState(); @Override int getListenerCount(); @Override boolean listensFor(EventType... types); @Override void addEventListener(EventListener<T> listener, EventType... types); @Override void addEventListener(EventListener<T> listener, int options, EventType... types); @Override void removeEventListener(EventListener<T> listener); @Override void dispatchEvent(EventType type, Event<T> event); @Override void restore(Memento memento);  }### Answer:
@Test void ensureStartingKernelProducesFileSystem() throws IOException { assertNull(kernel.getFileSystem(), "kernel filesystem must initially be null"); kernel.start(); assertNotNull(kernel.getFileSystem(), "kernel filesystem must now be set"); }
@Test void ensureInstallingAndStartingInvalidPluginFails() { installYamlModule(); springPlugin = relativeToProjectBuild("kernel-tests:test-plugins:test-plugin-spring", "war", "libs"); install(springPlugin); springPlugin = relativeToProjectBuild("kernel-tests:test-plugins:test-plugin-spring-error", "war", "libs"); install(springPlugin); start("spring-plugin-error"); val failed = kernel.getModuleManager().getModules(Lifecycle.State.Failed); assertEquals(failed.size(), 1, "must have one failed plugin"); }