HexUtils { public static void dump(byte[] buffer, Appendable out) throws IOException { dump(buffer, out, false); }  static void dump(byte[] buffer, Appendable out); static void dump(byte[] buffer, Appendable out,
            boolean prependAddress); static void dump(byte[] buffer, Appendable out, int bytesPerLine); static void dump(byte[] buffer, Appendable out, int bytesPerLine, boolean prependAddress); static void dump(ByteBuffer buffer, Appendable out, int bytesPerLine,
            boolean prependAddress);  }
@Test public void shouldRenderCorrectlyWithoutAddress() throws IOException { byte[] buffer = line.getBytes("UTF-8"); StringBuilder builder = new StringBuilder(); HexUtils.dump(buffer, builder, 16); String[] lines = builder.toString().split("\n"); assertThat(lines.length, is(7)); assertThat(lines[0], is("57 6f 6e 64 65 72 69 6e 67 20 68 6f 77 20 74 68 |Wondering.how.th|")); assertThat(lines[1], is("69 73 20 77 6f 72 6b 73 20 6f 75 74 2e 20 49 20 |is.works.out..I.|")); assertThat(lines[2], is("77 6f 75 6c 64 20 65 78 70 65 63 74 20 69 74 27 |would.expect.it.|")); assertThat(lines[3], is("73 20 61 6c 6c 20 67 6f 69 6e 67 20 74 6f 20 77 |s.all.going.to.w|")); assertThat(lines[4], is("6f 72 6b 20 6f 75 74 20 66 69 6e 65 2c 20 62 75 |ork.out.fine..bu|")); assertThat(lines[5], is("74 20 69 74 27 73 20 68 61 72 64 20 74 6f 20 74 |t.it.s.hard.to.t|")); assertThat(lines[6], is("65 6c 6c |ell |")); }