public void testExceptionWithSimpleMapper()
throws Exception
{
ObjectMapper mapper = new ObjectMapper();
try {
BrokenStringWriter sw = new BrokenStringWriter("TEST");
mapper.writeValue(sw, createLongObject());
fail("Should have gotten an exception");
} catch (IOException e) {
verifyException(e, IOException.class, "TEST");
}