Remove unnecessary imports and fix junit test for NIOWriteStream.