@Override
  public boolean isValid(final LightValue lightValue, final ConstraintValidatorContext context) {
    final ValidatorHelper helper = new ValidatorHelper();

    this.checkDimValue(helper, lightValue);

    return helper.isValid(context);
  }
 private void checkDimValue(final ValidatorHelper helper, final LightValue lightValue) {
   if (!lightValue.isOn() && lightValue.getDimValue() != null) {
     helper.addMessage(CHECK_DIM_VALUE_EMPTY_WHEN_LIGHT_OFF);
   }
 }