@After
  public void cleanup() throws Exception {
    if (state != null) {
      state.destroy();
    }
    if (stateForTokenTest != null) {
      stateForTokenTest.destroy();
    }
    assertTrue(tempDir + " could not be cleaned", StoreTestUtils.cleanDirectory(tempDir, true));
    assertTrue(tokenTestDir + " could not be cleaned", StoreTestUtils.cleanDirectory(tokenTestDir, true));
    PersistentIndex.CURRENT_VERSION = this.persistentIndexVersion;
  }
Releases all resources and deletes the temporary directory.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/IndexTest.java