private void newUndelete(BlobStoreStats blobStoreStats, MockId idToUndelete) throws StoreException {
    state.addUndeleteEntry(idToUndelete);
    IndexValue currentUndelete = state.getExpectedValue(idToUndelete, false);
    IndexValue originalPut = state.getExpectedValue(idToUndelete, true);
    IndexValue previousValue = state.getExpectedValue(idToUndelete,
        EnumSet.complementOf(EnumSet.of(PersistentIndex.IndexEntryType.TTL_UPDATE)),
        new FileSpan(originalPut.getOffset(), currentUndelete.getOffset()));
    blobStoreStats.handleNewUndeleteEntry(idToUndelete, currentUndelete, originalPut, previousValue);
  }
A helper function that undeletes the blob with the given {@link MockId} and inform {@link BlobStoreStats} about it.
@param blobStoreStats the {@link BlobStoreStats} instance to handle the new undelete
@param idToUndelete the {@link MockId} to be undeleted
@throws StoreException
ambry-store/src/test/java/com/github/ambry/store/BlobStoreStatsTest.java