### Question:
Base64Utility { public static char[] encodeChunk(byte[] id, int o, int l) { return encodeChunk(id, o, l, false); } private  Base64Utility(); static byte[] decodeChunk(char[] id,
                                     int o,
                                     int l); static byte[] decode(String id); static byte[] decode(String id, boolean urlSafe); static void decode(char[] id,
                             int o,
                             int l,
                             OutputStream ostream); static void decode(String id,
                              OutputStream ostream); static String encode(byte[] id); static String encode(byte[] id, boolean urlSafe); static char[] encodeChunk(byte[] id,
                                     int o,
                                     int l); static char[] encodeChunk(byte[] id,
                                     int o,
                                     int l,
                                     boolean urlSafe); static void encodeAndStream(byte[] id,
                                       int o,
                                       int l,
                                       OutputStream os); static void encodeAndStream(byte[] id,
                                           int o,
                                           int l,
                                           boolean urlSafe,
                                           OutputStream os); static void encodeChunk(byte[] id,
                                   int o,
                                   int l,
                                   OutputStream ostream); static void encode(byte[] id,
                              int o,
                              int l,
                              Writer writer); static boolean isValidBase64(int ch);  }### Answer:
@Test public void testEncodeMultipleChunks() throws Exception { final String text = "The true sign of intelligence is not knowledge but imagination."; byte[] bytes = text.getBytes(StandardCharsets.UTF_8); assertEquals(63, bytes.length); String s1 = new String(Base64Utility.encodeChunk(bytes, 0, bytes.length)); StringBuilder sb = new StringBuilder(); int off = 0; for (; off + 21 < bytes.length; off += 21) { sb.append(Base64Utility.encodeChunk(bytes, off, 21)); } if (off < bytes.length) { sb.append(Base64Utility.encodeChunk(bytes, off, bytes.length - off)); } String s2 = sb.toString(); assertEquals(s1, s2); }