### Question:
CommandRunner implements Runnable, Closeable { public void processPriorCommands() throws Exception { final RestoreCommands restoreCommands = commandStore.getRestoreCommands(); statementExecutor.handleRestoration(restoreCommands); } CommandRunner(
      StatementExecutor statementExecutor,
      CommandStore commandStore
  ); @Override void run(); @Override void close(); void processPriorCommands();  }### Answer:
@Test public void shouldFetchAndRunPriorCommandsFromCommandTopic() throws Exception { StatementExecutor statementExecutor = mock(StatementExecutor.class); statementExecutor.handleRestoration(anyObject()); expectLastCall(); replay(statementExecutor); CommandStore commandStore = mock(CommandStore.class); expect(commandStore.getRestoreCommands()).andReturn(new RestoreCommands()); replay(commandStore); CommandRunner commandRunner = new CommandRunner(statementExecutor, commandStore); commandRunner.processPriorCommands(); verify(statementExecutor); }