BytePrimitiveDeserializer extends PrimitiveDeserializer<Byte> { public Byte deserialize(String value) { return isBlank(value) ? (byte) 0 : valueOf(value); }  Byte deserialize(String value);  }
@Test public void shouldDeserializeToByte() throws Exception { assertEquals(Byte.valueOf("1"), deserialize(toTest, "1")); }
@Test public void shouldDeserializeNullTo0() throws Exception { assertEquals(Byte.valueOf((byte)0), deserialize(toTest, null)); }