void (@NotNull ClientId clientId, @NotNull Disposable disposable) { ApplicationImpl application = (ApplicationImpl)ApplicationManager.getApplication(); ClientAppSessionImpl clientAppSession = new ClientAppSessionImpl(clientId, ClientType.GUEST, application) { @NotNull @Override public @NlsSafe String getName() { return clientId.getValue(); } }; registerSession(clientAppSession, application, disposable); PluginDescriptor descriptor = ComponentManagerImpl.fakeCorePluginDescriptor; clientAppSession.registerServiceInstance(ClientCopyPasteManager.class, new MockCopyPasteManager(), descriptor); }