public static void copyStream(InputStream input, Writer output) throws IOException {
        try (InputStreamReader inputStreamReader = new InputStreamReader(input)) {
            char[] buffer = new char[1024]; // Adjust if you want
            int bytesRead;
            while ((bytesRead = inputStreamReader.read(buffer)) != -1) {
                output.write(buffer, 0, bytesRead);
            }
        }
    }
@Test
    void testCopyStreamOutputStream() throws IOException {
        InputStream inputStream = new ByteArrayInputStream("test".getBytes(StandardCharsets.UTF_8));
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        IOUtils.copyStream(inputStream, outputStream);

        assertThat(outputStream.toString()).contains("test");
    }