### Question:
KeanuProbabilisticModelWithGradient extends KeanuProbabilisticModel implements ProbabilisticModelWithGradient { @Override public Map<VariableReference, DoubleTensor> logLikelihoodGradients(Map<VariableReference, ?> inputs) { return gradients(inputs, logLikelihoodGradientCalculator); } KeanuProbabilisticModelWithGradient(BayesianNetwork bayesianNetwork);  KeanuProbabilisticModelWithGradient(Set<Vertex> variables); @Override Map<VariableReference, DoubleTensor> logProbGradients(Map<VariableReference, ?> inputs); @Override Map<VariableReference, DoubleTensor> logProbGradients(); @Override Map<VariableReference, DoubleTensor> logLikelihoodGradients(Map<VariableReference, ?> inputs); @Override Map<VariableReference, DoubleTensor> logLikelihoodGradients();  }### Answer:
@Test public void canCalculateLogProbGradient() { Map<? extends VariableReference, DoubleTensor> logLikelihoodGradients = model.logLikelihoodGradients(); LogProbGradientCalculator logLikelihoodGradientCalculator = new LogProbGradientCalculator( Collections.singletonList(C), Arrays.asList(A, B) ); canCalculateLogProbGradient(logLikelihoodGradientCalculator, logLikelihoodGradients); }