@Override
  public InputFile newInputFile(String location) {
    Preconditions.checkState(!closed, "Cannot call newInputFile after calling close()");
    byte[] contents = IN_MEMORY_FILES.get(location);
    if (null == contents) {
      throw new NotFoundException("No in-memory file found for location: %s", location);
    }
    return new InMemoryInputFile(location, contents);
  }
@Test
  public void testNewInputFileNotFound() {
    InMemoryFileIO fileIO = new InMemoryFileIO();
    assertThatExceptionOfType(NotFoundException.class)
        .isThrownBy(() -> fileIO.newInputFile("s3://nonexistent/file"));
  }