### Question:
SessionSingletonCommandsFactory { public static DeleteSelectionSessionCommand getInstanceDelete( final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager, final ManagedInstance<CanvasCommandFactory<AbstractCanvasHandler>> canvasCommandFactoryInstance, final Event<CanvasClearSelectionEvent> clearSelectionEvent, final DefinitionUtils definitionUtils, final SessionManager sessionManager) { final ClientSession currentSession = sessionManager.getCurrentSession(); if (!deleteSessionInstances.containsKey(currentSession)) { return new DeleteSelectionSessionCommand(sessionCommandManager, canvasCommandFactoryInstance, clearSelectionEvent, definitionUtils, sessionManager); } return deleteSessionInstances.get(currentSession); }  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);  }### Answer:
@Test public void testGetInstancesDelete() { final DeleteSelectionSessionCommand deleteSelectionSessionCommand = new DeleteSelectionSessionCommand(null, null, null, null, sessionManager); final DeleteSelectionSessionCommand instanceCopy = SessionSingletonCommandsFactory.getInstanceDelete(null, null, null, null, sessionManager); assertEquals(deleteSelectionSessionCommand, instanceCopy); when(sessionManager.getCurrentSession()).thenReturn(session2); final DeleteSelectionSessionCommand deleteSelectionSessionCommand2 = new DeleteSelectionSessionCommand(null, null, null, null, sessionManager); final DeleteSelectionSessionCommand instanceCopy2 = SessionSingletonCommandsFactory.getInstanceDelete(null, null, null, null, sessionManager); assertEquals(deleteSelectionSessionCommand2, instanceCopy2); }
@Test(expected = IllegalStateException.class) public void testGetInstancesOnFetchDelete() { final DeleteSelectionSessionCommand instanceCopy = SessionSingletonCommandsFactory.getInstanceDelete(null, null, null, null, sessionManager); final DeleteSelectionSessionCommand instanceCopy2 = new DeleteSelectionSessionCommand(null, null, null, null, sessionManager); }