}
@Test
public void testCustomExceptions() throws Exception {
final OutOfGasException expectedOutOfGasException = new OutOfGasException("Dagnabit!");
final FlatTireException expectedFlatTireException = new FlatTireException(new Wheel(Wheel.Location.BACK_RIGHT));
Car car = new Car();
car.setProblems(Arrays.asList(new Exception[]{expectedOutOfGasException, expectedFlatTireException}));
car = serDeser(car, Car.class);
final List<Exception> actualExceptions = car.getProblems();
final OutOfGasException actualOutOfGasException = (OutOfGasException)actualExceptions.get(0);
final FlatTireException actualFlatTireException = (FlatTireException)actualExceptions.get(1);
Assert.assertEquals(expectedOutOfGasException.getExplicitive(), actualOutOfGasException.getExplicitive());
Assert.assertSame(expectedFlatTireException.getWheel().getLocation(), actualFlatTireException.getWheel().getLocation());
Assert.assertEquals("Really?", actualFlatTireException.getMessage());
}