@Override
    public FSDataOutputStream create(Path f, WriteMode overwriteMode) throws IOException {
        return createOutputStream(() -> originalFs.create(f, overwriteMode));
    }
@Test
    void testSlowOutputStreamNotClosed() throws Exception {
        final LimitedConnectionsFileSystem fs =
                new LimitedConnectionsFileSystem(LocalFileSystem.getSharedInstance(), 1, 0L, 1000L);

        // some competing threads
        final Random rnd = new Random();
        final ReaderThread[] threads = new ReaderThread[10];
        for (int i = 0; i < threads.length; i++) {
            File file = File.createTempFile("junit", null, tempFolder);
            createRandomContents(file, rnd);
            Path path = new Path(file.toURI());
            threads[i] = new ReaderThread(fs, path, 1, Integer.MAX_VALUE);
        }

        // open the stream we test
        try (FSDataOutputStream out =
                fs.create(
                        new Path(File.createTempFile("junit", null, tempFolder).toURI()),
                        WriteMode.OVERWRITE)) {

            // start the other threads that will try to shoot this stream down
            for (ReaderThread t : threads) {
                t.start();
            }

            // read the stream slowly.
            Thread.sleep(5);
            for (int bytesLeft = 50; bytesLeft > 0; bytesLeft--) {
                out.write(bytesLeft);
                Thread.sleep(5);
            }
        }

        // wait for clean shutdown
        for (ReaderThread t : threads) {
            t.sync();
        }
    }