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