@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));
}