### Question:
ClearSessionCommand extends AbstractClientSessionCommand<EditorSession> { @Override public boolean accepts(final ClientSession session) { return session instanceof EditorSession; } protected  ClearSessionCommand(); @Inject  ClearSessionCommand(final @Any ManagedInstance<CanvasCommandFactory<AbstractCanvasHandler>> canvasCommandFactoryInstance,
                               final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                               final Event<ClearSessionCommandExecutedEvent> commandExecutedEvent,
                               final DefinitionUtils definitionUtils); @Override void bind(final EditorSession session); @Override boolean accepts(final ClientSession session); @Override @SuppressWarnings("unchecked") void execute(final Callback<V> callback);  }### Answer:
@Test public void testAcceptsSession() { assertTrue(command.accepts(mock(EditorSession.class))); assertFalse(command.accepts(mock(ViewerSession.class))); }