### Question:
ByteOptionFieldAdapter extends NumericOptionFieldAdapter<ByteOption> { public static Builder builder() { return new Builder(); } ByteOptionFieldAdapter(String nullFormat, DecimalFormat decimalFormat); static Builder builder();  }### Answer:
@Test public void parse() { ByteOptionFieldAdapter adapter = ByteOptionFieldAdapter.builder().build(); checkParse(adapter, 0, new ByteOption((byte) 0)); checkParse(adapter, 1, new ByteOption((byte) 1)); checkParse(adapter, -1, new ByteOption((byte) -1)); checkParse(adapter, Byte.MAX_VALUE, new ByteOption(Byte.MAX_VALUE)); checkParse(adapter, Byte.MIN_VALUE, new ByteOption(Byte.MIN_VALUE)); }
@Test public void parse_overflow() { ByteOptionFieldAdapter adapter = ByteOptionFieldAdapter.builder().build(); checkMalformed(adapter, BigInteger.valueOf(Byte.MAX_VALUE).add(BigInteger.ONE).toString(), new ByteOption()); }
@Test public void parse_empty() { ByteOptionFieldAdapter adapter = ByteOptionFieldAdapter.builder().build(); checkMalformed(adapter, "", new ByteOption()); }
@Test public void parse_null() { ByteOptionFieldAdapter adapter = ByteOptionFieldAdapter.builder().withNullFormat("").build(); checkParse(adapter, "", new ByteOption()); }
@Test public void emit() { ByteOptionFieldAdapter adapter = ByteOptionFieldAdapter.builder().build(); checkEmit(adapter, new ByteOption((byte) 1), 1); checkEmit(adapter, new ByteOption((byte) -1), -1); }
@Test public void emit_null() { ByteOptionFieldAdapter adapter = ByteOptionFieldAdapter.builder().build(); checkEmit(adapter, new ByteOption(), null); }
@Test public void emit_null_formatted() { ByteOptionFieldAdapter adapter = ByteOptionFieldAdapter.builder().withNullFormat("").build(); checkEmit(adapter, new ByteOption(), ""); }
@Test public void number_format() { ByteOptionFieldAdapter adapter = ByteOptionFieldAdapter.builder() .withNumberFormat("00") .build(); checkParse(adapter, 0, new ByteOption((byte) 0)); checkParse(adapter, 1, new ByteOption((byte) 1)); checkParse(adapter, -1, new ByteOption((byte) -1)); checkParse(adapter, Byte.MAX_VALUE, new ByteOption(Byte.MAX_VALUE)); checkParse(adapter, Byte.MIN_VALUE, new ByteOption(Byte.MIN_VALUE)); checkMalformed(adapter, "", new ByteOption()); checkMalformed(adapter, "Hello, world!", new ByteOption()); checkMalformed(adapter, BigInteger.valueOf(Byte.MAX_VALUE).add(BigInteger.ONE).toString(), new ByteOption()); checkEmit(adapter, new ByteOption((byte) 1), "01"); checkEmit(adapter, new ByteOption((byte) -1), "-01"); checkEmit(adapter, new ByteOption((byte) 100), "100"); checkEmit(adapter, new ByteOption((byte) -100), "-100"); }