AppFormerJsActivityLoader implements PlaceManagerImpl.AppFormerActivityLoader { Activity updateRealContent(final JavaScriptObject jsObject, final String componentId) { final Activity activity = activityManager.getActivity(new DefaultPlaceRequest(componentId)); final JsWorkbenchLazyActivity lazyActivity = (JsWorkbenchLazyActivity) activity; lazyActivity.updateRealContent(jsObject); return activity; } @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 updateRealContent() { final JavaScriptObject jsObject = mock(JavaScriptObject.class); final JsWorkbenchScreenActivity activity = mock(JsWorkbenchScreenActivity.class); doReturn(activity).when(activityManager).getActivity(any()); final Activity foo = appFormerJsActivityLoader.updateRealContent(jsObject, "foo"); assertEquals(foo, activity); verify((JsWorkbenchLazyActivity) foo).updateRealContent(jsObject); }