@Test void testConvert() throws UnsupportedEncodingException { StringToByteArrayConverter testSubject = new StringToByteArrayConverter(); assertEquals(String.class, testSubject.expectedSourceType()); assertEquals(byte[].class, testSubject.targetType()); assertArrayEquals("hello".getBytes(StandardCharsets.UTF_8), testSubject.convert("hello")); }
@Override public byte[] convert(String original) { return original.getBytes(UTF8); }
StringToByteArrayConverter implements ContentTypeConverter<String,byte[]> { @Override public byte[] convert(String original) { return original.getBytes(UTF8); } }
StringToByteArrayConverter implements ContentTypeConverter<String,byte[]> { @Override public byte[] convert(String original) { return original.getBytes(UTF8); }  }
StringToByteArrayConverter implements ContentTypeConverter<String,byte[]> { @Override public byte[] convert(String original) { return original.getBytes(UTF8); }  @Override Class<String> expectedSourceType(); @Override Class<byte[]> targetType(); @Override byte[] convert(String original); }
StringToByteArrayConverter implements ContentTypeConverter<String,byte[]> { @Override public byte[] convert(String original) { return original.getBytes(UTF8); }  @Override Class<String> expectedSourceType(); @Override Class<byte[]> targetType(); @Override byte[] convert(String original);  }