@Test @Ignore public void testAddCarsUncaughtException() { try { manufacturerService.setIsMockFail(true); List<Car> cars = getValidCars(); cars.get(1).setManufacturer("XXX"); garageService.addCarsThrowException(cars); } catch (CarException e) { assertThat(e.getClass().getName(), is(CarException.class.getName())); assertThat(e.getCause().getClass().getName(), is(RpcException.class.getName())); assertThat(e.getCause().getMessage(), is("Get all manufacturers failed")); } finally { manufacturerService.setIsMockFail(false); } }
@Override public Result addCarsThrowException(List<Car> cars) { return addCars(cars); }
GarageServiceImpl implements GarageService { @Override public Result addCarsThrowException(List<Car> cars) { return addCars(cars); } }
GarageServiceImpl implements GarageService { @Override public Result addCarsThrowException(List<Car> cars) { return addCars(cars); }  }
GarageServiceImpl implements GarageService { @Override public Result addCarsThrowException(List<Car> cars) { return addCars(cars); }  @Override Result addCars(List<Car> cars); @Override Result addCarsThrowException(List<Car> cars); @Override Result addCar(Car car); @Override ComplexResult buildGarage(Garage garage); }
GarageServiceImpl implements GarageService { @Override public Result addCarsThrowException(List<Car> cars) { return addCars(cars); }  @Override Result addCars(List<Car> cars); @Override Result addCarsThrowException(List<Car> cars); @Override Result addCar(Car car); @Override ComplexResult buildGarage(Garage garage);  }