QuickValidator { public static ComplexResult2 doAndGetComplexResult2(Decorator decorator, ValidatorContext context) { return validate(decorator, FluentValidator.checkAll(), context, ResultCollectors.toComplex2()); }  static ComplexResult doAndGetComplexResult(Decorator decorator, ValidatorContext context); static ComplexResult doAndGetComplexResult(Decorator decorator); static ComplexResult2 doAndGetComplexResult2(Decorator decorator, ValidatorContext context); static ComplexResult2 doAndGetComplexResult2(Decorator decorator); static T validate(Decorator decorator, FluentValidator fluentValidator, ValidatorContext context, ResultCollector<T> resultCollector);  }
@Test public void testCarComplexResult2() { final Car car = getValidCar(); ComplexResult2 ret = QuickValidator.doAndGetComplexResult2(new Decorator() { @Override public FluentValidator decorate(FluentValidator fv) { return fv.on(car.getLicensePlate(), new CarLicensePlateValidator()) .on(car.getManufacturer(), new CarManufacturerValidator()) .on(car.getSeatCount(), new CarSeatCountValidator()); } }); System.out.println(ret); assertThat(ret.isSuccess(), is(true)); assertThat(ret.getErrors(), notNullValue()); assertThat(ret.getErrors().isEmpty(), is(true)); }