@Override
    public boolean put(File localFile, JobID jobId, BlobKey blobKey) throws IOException {
        createBasePathIfNeeded();
        String toBlobPath = BlobUtils.getStorageLocationPath(basePath, jobId, blobKey);
        try (FSDataOutputStream os =
                fileSystem.create(new Path(toBlobPath), FileSystem.WriteMode.OVERWRITE)) {
            LOG.debug("Copying from {} to {}.", localFile, toBlobPath);
            Files.copy(localFile, os);

            os.sync();
        }
        return true;
    }
@Test
    void testSuccessfulPut() throws IOException {
        final Path temporaryFile = createTemporaryFileWithContent("put");

        final JobID jobId = new JobID();
        final BlobKey blobKey = createPermanentBlobKeyFromFile(temporaryFile);
        // Blob store operations are creating the base directory on-the-fly
        assertThat(getBlobDirectoryPath()).doesNotExist();

        final boolean successfullyWritten =
                testInstance.put(temporaryFile.toFile(), jobId, blobKey);
        assertThat(successfullyWritten).isTrue();

        assertThat(getPath(jobId)).isDirectory().exists();
        assertThat(getPath(jobId, blobKey)).isNotEmptyFile().hasSameTextualContentAs(temporaryFile);
    }