@Test public void testJsonEscapedSizeInBytes() {

  assertThat(jsonEscapedSizeInBytes(new String(new char[] {0, 'a', 1})))
      .isEqualTo(13);
  assertThat(jsonEscapedSizeInBytes(new String(new char[] {'"', '\\', '\t', '\b'})))
      .isEqualTo(8);
  assertThat(jsonEscapedSizeInBytes(new String(new char[] {'\n', '\r', '\f'})))
      .isEqualTo(6);
  assertThat(jsonEscapedSizeInBytes("\u2028 and \u2029"))
      .isEqualTo(17);
  assertThat(jsonEscapedSizeInBytes("\"foo"))
      .isEqualTo(5);
}