### Question:
BinaryCodec extends CodecImpl { @NonNull @Override public String encode(@NonNull String text) { return textToBinary(text); }  @NonNull @Override String encode(@NonNull String text); @NonNull @Override String decode(@NonNull String text); @NonNull @Override String getName(Context context);  }### Answer:
@Test public void testEncode() throws Exception { String encode = codec.encode("汉语/漢語; Hànyǔ or 中文; Zhōngwén"); System.out.println(encode); assertEquals("0110110001001001 1000101111101101 00101111 0110111100100010 1000101010011110 00111011 00100000 01001000 11100000 01101110 01111001 0000000111010100 00100000 01101111 01110010 00100000 0100111000101101 0110010110000111 00111011 00100000 01011010 01101000 0000000101001101 01101110 01100111 01110111 11101001 01101110", encode); }
@Test public void testEncode2() { String encoded = new BinaryCodec().encode("2"); assertEquals(encoded, "00110010"); }
@Test public void encodeUtf16() { String expected = UTF_16_STR; String encoded = codec.encode(expected); assertEquals("000000011111010010100111", encoded); }