@Override
    public void close() throws BlockStoreException {
        try {
            buffer.force();
            buffer = null;  // Allow it to be GCd and the underlying file mapping to go away.
            fileLock.release();
            randomAccessFile.close();
            blockCache.clear();
        } catch (IOException e) {
            throw new BlockStoreException(e);
        }
    }
@Test
    public void oneStoreDelete() throws Exception {
        SPVBlockStore store = new SPVBlockStore(TESTNET, blockStoreFile);
        store.close();
        boolean deleted = blockStoreFile.delete();
        if (!PlatformUtils.isWindows()) {
            // TODO: Deletion is failing on Windows
            assertTrue(deleted);
        }
    }