AppFormerJsActivityLoader implements PlaceManagerImpl.AppFormerActivityLoader { Optional<String> getScriptFileName(final String componentId) { final Optional<String> editorScriptUrl = ofNullable(editors.get(componentId)) .map(AppFormerComponentsRegistry.Entry::getSource); return editorScriptUrl.isPresent() ? editorScriptUrl : ofNullable(components.get(componentId)); } @Inject  AppFormerJsActivityLoader(final Promises promises,
                                     final ActivityManager activityManager,
                                     final ActivityBeansCache activityBeansCache,
                                     final PlaceManager placeManager,
                                     final LazyLoadingScreen lazyLoadingScreen,
                                     final Event<ActivityLazyLoaded> activityLazyLoadedEvent,
                                     final @Shadowed Instance<JsWorkbenchEditorActivity> jsWorkbenchEditorActivityInstance,
                                     final AppFormerComponentsRegistry appFormerComponentsRegistry); void init(final String gwtModuleName); void onComponentLoaded(final Object jsObject); native String extractComponentId(final Object object); boolean triggerLoadOfMatchingEditors(final Path path,
                                                final Runnable successCallback);  }
@Test public void getScriptFileName_unexistent() { assertEquals(Optional.empty(), appFormerJsActivityLoader.getScriptFileName("my-component")); }