run method
Runs the check on a store that newStore creates over empty storage. The check opens the store, and closes it
at the end. It throws a StateError that says what is wrong when the store breaks the contract.
Implementation
Future<void> run(CacheStore Function() newStore) async {
final CacheStore store = newStore();
await store.open();
try {
await _body(store);
} finally {
await store.close();
}
}