@Test public void testBuildGarageCarNumExceed() { try { Garage garage = getValidGarage(); List<Car> cars = Lists.newArrayList(); for (int i = 0; i < 100; i++) { cars.add(new Car("BMW", "LA1234", 5)); } garage.setCarList(cars); garageService.buildGarage(garage); } catch (CarException e) { assertThat(e.getClass().getName(), is(CarException.class.getName())); assertThat(e.getMessage(), is(MessageSupport.getText("car.size.exceed", 50))); } }
@Override public Garage buildGarage(@FluentValid Garage garage) { System.out.println(garage); return garage; }
GarageServiceImpl2 implements GarageService2 { @Override public Garage buildGarage(@FluentValid Garage garage) { System.out.println(garage); return garage; } }
GarageServiceImpl2 implements GarageService2 { @Override public Garage buildGarage(@FluentValid Garage garage) { System.out.println(garage); return garage; }  }
GarageServiceImpl2 implements GarageService2 { @Override public Garage buildGarage(@FluentValid Garage garage) { System.out.println(garage); return garage; }  @Override List<Car> addCars(@FluentValid(NotEmptyValidator.class) List<Car> cars); @Override List<Car> addCarsThrowException(@FluentValid List<Car> cars); @Override Car addCar(@FluentValid Car car); @Override Garage buildGarage(@FluentValid Garage garage); }
GarageServiceImpl2 implements GarageService2 { @Override public Garage buildGarage(@FluentValid Garage garage) { System.out.println(garage); return garage; }  @Override List<Car> addCars(@FluentValid(NotEmptyValidator.class) List<Car> cars); @Override List<Car> addCarsThrowException(@FluentValid List<Car> cars); @Override Car addCar(@FluentValid Car car); @Override Garage buildGarage(@FluentValid Garage garage);  }