IntegerPrimitiveDeserializer extends PrimitiveDeserializer { public Integer deserialize(String value) { return isBlank(value) ? 0 : valueOf(value); }  Integer deserialize(String value);  }
@Test public void shouldDeserializeToInteger() throws Exception { assertEquals(Integer.valueOf(-1), deserialize(toTest, "-1")); }
@Test public void shouldDeserializeNullTo0() throws Exception { assertEquals(Integer.valueOf(0), deserialize(toTest, null)); }