@Override
    public void close() {}
@Test
    void testCompression() throws IOException {
        AtomicBoolean outputStreamClosed = new AtomicBoolean(false);

        FileSystem wrappedFileSystem =
                new LocalFileSystem() {
                    @Override
                    public FSDataOutputStream create(Path filePath, WriteMode overwrite)
                            throws IOException {
                        checkNotNull(filePath, "filePath");

                        if (exists(filePath) && overwrite == WriteMode.NO_OVERWRITE) {
                            throw new FileAlreadyExistsException(
                                    "File already exists: " + filePath);
                        }

                        final Path parent = filePath.getParent();
                        if (parent != null && !mkdirs(parent)) {
                            throw new IOException("Mkdirs failed to create " + parent);
                        }

                        final File file = pathToFile(filePath);
                        return new LocalDataOutputStream(file) {
                            @Override
                            public void close() throws IOException {
                                super.close();
                                outputStreamClosed.set(true);
                            }
                        };
                    }
                };

        StateChangeFsUploader uploader = createUploader(wrappedFileSystem, false);
        uploader.upload(Collections.emptyList());
        assertThat(outputStreamClosed.get()).isTrue();

        outputStreamClosed.set(false);
        uploader = createUploader(wrappedFileSystem, true);
        uploader.upload(Collections.emptyList());
        assertThat(outputStreamClosed.get()).isTrue();
    }