### Question:
MapDBPersistentStore implements IStore { @Override public void close() { if (this.m_db.isClosed()) { LOG.warn("MapDB store is already closed. Nothing will be done"); return; } LOG.info("Performing last commit to MapDB"); this.m_db.commit(); LOG.info("Closing MapDB store"); this.m_db.close(); LOG.info("Stopping MapDB commit tasks"); this.m_scheduler.shutdown(); try { m_scheduler.awaitTermination(10L, TimeUnit.SECONDS); } catch (InterruptedException e) { } if (!m_scheduler.isTerminated()) { LOG.warn("Forcing shutdown of MapDB commit tasks"); m_scheduler.shutdown(); } LOG.info("MapDB store has been closed successfully"); } MapDBPersistentStore(IConfig props); @Override IMessagesStore messagesStore(); @Override ISessionsStore sessionsStore(); @Override void initStore(); @Override void close();  }### Answer:
@Test public void testCloseShutdownCommitTask() throws InterruptedException { m_storageService.close(); assertTrue("Storage service scheduler can't be stopped in 3 seconds", m_storageService.m_scheduler.awaitTermination(3, TimeUnit.SECONDS)); assertTrue(m_storageService.m_scheduler.isTerminated()); }