@Override
    public void write(int c) {
        mBuffer.append((char) c);
    }
@Test
    void testWriteCharWithWrongLength() throws IOException {
        Assertions.assertThrows(IndexOutOfBoundsException.class, () -> {
            UnsafeStringWriter writer = new UnsafeStringWriter();
            char[] chars = new char[0];
            writer.write(chars, 0, 1);
        });
    }