} catch (IllegalArgumentException ex) {
// ok
}
Tyre t = createTyre(19D, "P Zero", "235/40ZR19", "Pirelli", BigDecimal.valueOf(450));
TyreTO tto = mapper.map(t, TyreTO.class);
try {
service.update(tto);
fail("exception should be thrown");
} catch (IllegalArgumentException ex) {
// ok
}
try {
service.remove(tto);
fail("exception should be thrown");
} catch (IllegalArgumentException ex) {
// ok
}
tto.setId(1L);
try {
service.create(tto);
fail("exception should be thrown");
} catch (IllegalArgumentException ex) {
//ok