### Question:
DefaultWorkbenchEntryPoint { protected void setupRpcDefaultErrorCallback() { final ErrorCallback<Message> originalRpcErrorCallback = AbstractRpcProxy.DEFAULT_RPC_ERROR_CALLBACK; AbstractRpcProxy.DEFAULT_RPC_ERROR_CALLBACK = (final Message m, final Throwable t) -> { m.remove("MethodParms"); m.remove("MethodReply"); genericErrorPopup.setup(BusToolsCli.encodeMessage(m)); return originalRpcErrorCallback.error(m, t); }; } @Inject  DefaultWorkbenchEntryPoint(final Caller<AppConfigService> appConfigService,
                                      final ActivityBeansCache activityBeansCache,
                                      final DefaultWorkbenchErrorCallback defaultWorkbenchErrorCallback); @Inject void setGenericErrorPopup(final GenericErrorPopup genericErrorPopup); @AfterInitialization void startDefaultWorkbench(); @AfterInitialization void hideLoadingPopup();  }### Answer:
@Test public void testSetupRpcDefaultErrorCallback() { MarshallingSessionProviderFactory.setMarshallingSessionProvider(mock(MarshallingSessionProvider.class)); AbstractRpcProxy.DEFAULT_RPC_ERROR_CALLBACK = mock(ErrorCallback.class); entryPoint.setupRpcDefaultErrorCallback(); AbstractRpcProxy.DEFAULT_RPC_ERROR_CALLBACK.error(mock(Message.class), new RuntimeException()); verify(genericErrorPopup).setup("{}"); }