### Question:
TextCodec implements ContentCodec { @Override public byte[] valueToBytes(Object value, Map<String, String> parameters) { String charset = parameters.get("charset"); if (charset != null) { return value.toString().getBytes(Charset.forName(charset)); } else { return value.toString().getBytes(); } }  @Override String getMediaType(); @Override T bytesToValue(byte[] body, DataSchema<T> schema, Map<String, String> parameters); @Override byte[] valueToBytes(Object value, Map<String, String> parameters);  }### Answer:
@Test public void valueToBytes() throws ContentCodecException { String value = "Hallo Welt"; byte[] bytes = codec.valueToBytes(value); assertArrayEquals("Hallo Welt".getBytes(), bytes); }