### Question:
BaseStringWriter implements StringWriter { @Override public void put(long pos, String val) { byteArrayWriter.put(pos, val.getBytes(StringWriter.CHARSET)); } BaseStringWriter(ByteArrayWriter byteArrayWriter); @Override void put(long pos, String val); @Override void release();  }### Answer:
@Test public void put() { new BaseStringWriter(byteArrayWriter).put(1, "1士大夫"); verify(byteArrayWriter).put(1, "1士大夫".getBytes(Charset.forName("utf8"))); }