### Question:
ByteConverterFactory implements TypeConverterFactory<String, Byte> { @Override public TypeConverter<String, Byte> createTypeConverter() { return value -> { try { return Byte.parseByte(value.trim()); } catch(NumberFormatException e) { throw new TypeConverterException("Failed to decode Byte value '" + value + "'.", e); } }; }  @Override TypeConverter<String, Byte> createTypeConverter(); @Override TypeConverterDescriptor<Class<String>, Class<Byte>> getTypeConverterDescriptor();  }### Answer:
@Test public void test_empty_ok_value() { assertEquals(new Byte((byte) 1), byteConverterFactory.createTypeConverter().convert("1")); }
@Test public void test_empty_data_string() { try { byteConverterFactory.createTypeConverter().convert(""); fail("Expected DataDecodeException"); } catch (TypeConverterException e) { assertEquals("Failed to decode Byte value ''.", e.getMessage()); } }