CharBuffer { int length() { return cs.length; } private  CharBuffer(char[] cs); @Override String toString(); public char[] cs; public int position; }
@Test public void length() { assertThat(CharBuffer.fromString("").length(), is(0)); assertThat(CharBuffer.fromString(".").length(), is(1)); assertThat(CharBuffer.fromString("..").length(), is(2)); assertThat(CharBuffer.fromString("...").length(), is(3)); }