DateDeserializer extends TypeDeserializer<Date> { @Override protected Date deserialize(InputStream stream, Charset charset) throws Exception { synchronized (formatter) { return formatter.parse(IOs.toString(stream, charset, true)); } } DateDeserializer(CRestConfig crestConfig);   }
@Test public void shouldDeserializeDateStringToDateUsingDefaultDateFormat() throws Exception { assertEquals(Values.DATE, deserialize(toTest, DATE_STR_DEFAULT_FORMAT)); }
@Test(expected= ParseException.class) public void shouldDeserializeAnyThrowException() throws Exception { deserialize(toTest,"nusdfsdfl"); }
@Test(expected= NullPointerException.class) public void shouldDeserializeNullThrowException() throws Exception { deserialize(toTest, null); }