@Test(expected = IllegalStateException.class) public void testGetInstancesOnFetchCopyError() { final CopySelectionSessionCommand instanceCopy = SessionSingletonCommandsFactory.getInstanceCopy(null, sessionManager); final CopySelectionSessionCommand instanceCopy2 = new CopySelectionSessionCommand(null, sessionManager); }
public static CopySelectionSessionCommand getInstanceCopy( final Event<?> commandExecutedEvent, SessionManager sessionManager) { final ClientSession currentSession = sessionManager.getCurrentSession(); if (!copySessionInstances.containsKey(currentSession)) { final CopySelectionSessionCommand copySelectionSessionCommand = new CopySelectionSessionCommand((Event<CopySelectionSessionCommandExecutedEvent>) commandExecutedEvent, sessionManager); return copySelectionSessionCommand; } final CopySelectionSessionCommand copySelectionSessionCommand = copySessionInstances.get(currentSession); return copySelectionSessionCommand; }
SessionSingletonCommandsFactory { public static CopySelectionSessionCommand getInstanceCopy( final Event<?> commandExecutedEvent, SessionManager sessionManager) { final ClientSession currentSession = sessionManager.getCurrentSession(); if (!copySessionInstances.containsKey(currentSession)) { final CopySelectionSessionCommand copySelectionSessionCommand = new CopySelectionSessionCommand((Event<CopySelectionSessionCommandExecutedEvent>) commandExecutedEvent, sessionManager); return copySelectionSessionCommand; } final CopySelectionSessionCommand copySelectionSessionCommand = copySessionInstances.get(currentSession); return copySelectionSessionCommand; } }
SessionSingletonCommandsFactory { public static CopySelectionSessionCommand getInstanceCopy( final Event<?> commandExecutedEvent, SessionManager sessionManager) { final ClientSession currentSession = sessionManager.getCurrentSession(); if (!copySessionInstances.containsKey(currentSession)) { final CopySelectionSessionCommand copySelectionSessionCommand = new CopySelectionSessionCommand((Event<CopySelectionSessionCommandExecutedEvent>) commandExecutedEvent, sessionManager); return copySelectionSessionCommand; } final CopySelectionSessionCommand copySelectionSessionCommand = copySessionInstances.get(currentSession); return copySelectionSessionCommand; }  }
SessionSingletonCommandsFactory { public static CopySelectionSessionCommand getInstanceCopy( final Event<?> commandExecutedEvent, SessionManager sessionManager) { final ClientSession currentSession = sessionManager.getCurrentSession(); if (!copySessionInstances.containsKey(currentSession)) { final CopySelectionSessionCommand copySelectionSessionCommand = new CopySelectionSessionCommand((Event<CopySelectionSessionCommandExecutedEvent>) commandExecutedEvent, sessionManager); return copySelectionSessionCommand; } final CopySelectionSessionCommand copySelectionSessionCommand = copySessionInstances.get(currentSession); return copySelectionSessionCommand; }  static void createOrPut(AbstractSelectionAwareSessionCommand<EditorSession> command, SessionManager sessionManager); static CopySelectionSessionCommand getInstanceCopy(
            final Event<?> commandExecutedEvent,
            SessionManager sessionManager); static DeleteSelectionSessionCommand getInstanceDelete(
            final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
            final ManagedInstance<CanvasCommandFactory<AbstractCanvasHandler>> canvasCommandFactoryInstance,
            final Event<CanvasClearSelectionEvent> clearSelectionEvent,
            final DefinitionUtils definitionUtils,
            final SessionManager sessionManager); }
SessionSingletonCommandsFactory { public static CopySelectionSessionCommand getInstanceCopy( final Event<?> commandExecutedEvent, SessionManager sessionManager) { final ClientSession currentSession = sessionManager.getCurrentSession(); if (!copySessionInstances.containsKey(currentSession)) { final CopySelectionSessionCommand copySelectionSessionCommand = new CopySelectionSessionCommand((Event<CopySelectionSessionCommandExecutedEvent>) commandExecutedEvent, sessionManager); return copySelectionSessionCommand; } final CopySelectionSessionCommand copySelectionSessionCommand = copySessionInstances.get(currentSession); return copySelectionSessionCommand; }  static void createOrPut(AbstractSelectionAwareSessionCommand<EditorSession> command, SessionManager sessionManager); static CopySelectionSessionCommand getInstanceCopy(
            final Event<?> commandExecutedEvent,
            SessionManager sessionManager); static DeleteSelectionSessionCommand getInstanceDelete(
            final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
            final ManagedInstance<CanvasCommandFactory<AbstractCanvasHandler>> canvasCommandFactoryInstance,
            final Event<CanvasClearSelectionEvent> clearSelectionEvent,
            final DefinitionUtils definitionUtils,
            final SessionManager sessionManager);  }