@Override
  public void deleteFile(String location) {
    Preconditions.checkState(!closed, "Cannot call deleteFile after calling close()");
    if (null == IN_MEMORY_FILES.remove(location)) {
      throw new NotFoundException("No in-memory file found for location: %s", location);
    }
  }
@Test
  public void testDeleteFileNotFound() {
    InMemoryFileIO fileIO = new InMemoryFileIO();
    assertThatExceptionOfType(NotFoundException.class)
        .isThrownBy(() -> fileIO.deleteFile("s3://nonexistent/file"));
  }