### Question:
RawJsonTranscoder implements Transcoder { @Override public EncodedValue encode(final Object input) { if (input instanceof CommonOptions.BuiltCommonOptions || input instanceof CommonOptions) { throw InvalidArgumentException.fromMessage("No content provided, cannot " + "encode " + input.getClass().getSimpleName() + " as content!"); } if (input instanceof byte[]) { return new EncodedValue((byte[]) input, CodecFlags.JSON_COMPAT_FLAGS); } else if (input instanceof String) { return new EncodedValue(((String) input).getBytes(StandardCharsets.UTF_8), CodecFlags.JSON_COMPAT_FLAGS); } else { throw InvalidArgumentException.fromMessage("Only byte[] and String types are supported for the RawJsonTranscoder!"); } } private  RawJsonTranscoder(); @Override EncodedValue encode(final Object input); @Override @SuppressWarnings("unchecked") T decode(final Class<T> target, final byte[] input, int flags); static RawJsonTranscoder INSTANCE; }### Answer:
@Test void encodesJsonPassthroughString() { String input = "{\"hello\": true}"; Transcoder.EncodedValue output = RAW_JSON_TRANSCODER.encode(input); assertArrayEquals(input.getBytes(StandardCharsets.UTF_8), output.encoded()); }
@Test void encodesJsonPassthroughByteArray() { byte[] input = "{\"hello\": true}".getBytes(StandardCharsets.UTF_8); Transcoder.EncodedValue output = RAW_JSON_TRANSCODER.encode(input); assertArrayEquals(input, output.encoded()); }