### Question:
OctalCodec extends CodecImpl { @NonNull @Override public String encode(@NonNull final String text) { final ArrayList<Integer> chars = CodePointUtil.codePointsArr(text); setMax(chars.size()); setConfident(chars.size()); StringBuilder result = new StringBuilder(); for (int i = 0; i < chars.size(); i++) { Integer c = chars.get(i); result.append(Integer.toOctalString(c)); if (i != chars.size() - 1) { result.append(" "); } } return result.toString(); }  @NonNull @Override String getName(Context context); @NonNull @Override String encode(@NonNull final String text); @NonNull @Override String decode(@NonNull String text);  }### Answer:
@Test public void encode() throws Exception { Assert.assertEquals(codec.encode(TO_BE_ENCODE), TO_BE_DECODE); }
@Test public void encodeUtf16() { String utf16Str = AsciiCodecTest.UTF_16_STR; String encode = codec.encode(utf16Str); assertEquals("372247", encode); }