@Override
    public boolean validateTree(ValidationContext validationContext) {
        validate(validationContext);
        return (onCancelConfig.validateTree(validationContext) && errors.isEmpty() && !configuration.hasErrors());
    }
@Test
    public void validateTreeShouldVerifyIfPluggableTaskHasErrors() {
        PluggableTask pluggableTask = new PluggableTask(new PluginConfiguration(), new Configuration());
        pluggableTask.addError("task", "invalid plugin");

        assertFalse(pluggableTask.validateTree(null));
    }