### Question:
DMNClientDiagramValidator extends ClientDiagramValidator { RemoteCallback<Collection<DomainViolation>> onValidatorSuccess(final Collection<DiagramElementViolation<RuleViolation>> diagramElementViolations, final Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer) { return (Collection<DomainViolation> backendViolations) -> { final List<DiagramElementViolation<RuleViolation>> violations = getDiagramElementViolations(diagramElementViolations); violations.addAll(convert(backendViolations)); resultConsumer.accept(violations); }; } protected  DMNClientDiagramValidator(); @Inject  DMNClientDiagramValidator(final DefinitionManager definitionManager,
                                     final RuleManager ruleManager,
                                     final TreeWalkTraverseProcessor treeWalkTraverseProcessor,
                                     final ModelValidator modelValidator,
                                     final ManagedInstance<DomainValidator> validators,
                                     final Caller<DMNDomainValidator> dmnDomainValidator,
                                     final DMNMarshallerService dmnMarshallerService); @Override void validate(final Diagram diagram,
                         final Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer);  }### Answer:
@Test public void testOnValidatorSuccess() { final ElementViolationImpl elementViolation = new ElementViolationImpl.Builder().build(); final MarshallingMessage marshallingMessage = MarshallingMessage.builder().build(); final Collection<DiagramElementViolation<RuleViolation>> diagramElementViolations = singletonList(elementViolation); final Collection<DomainViolation> response = singletonList(marshallingMessage); final Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer = (collection) -> { assertEquals(1, collection.size()); }; validator.onValidatorSuccess(diagramElementViolations, resultConsumer).callback(response); }