### Question:
BackPropagation extends LMS { protected double calculateHiddenNeuronError(Neuron neuron) { double deltaSum = 0d; for (Connection connection : neuron.getOutConnections()) { double delta = connection.getToNeuron().getDelta() * connection.getWeight().value; deltaSum += delta; } TransferFunction transferFunction = neuron.getTransferFunction(); double netInput = neuron.getNetInput(); double f1 = transferFunction.getDerivative(netInput); double delta = f1 * deltaSum; return delta; } BackPropagation();   }### Answer:
@Test public void testCalculateHiddenNeuronError() { Neuron n = new Neuron(); n.setDelta(0.5); Neuron n1 = new Neuron(); Linear transfer = new Linear(); n1.setTransferFunction(transfer); double weigth = 2; n.addInputConnection(new Connection(n1, n, weigth)); double result = n.getDelta() * weigth * transfer.getDerivative(n.getNetInput()); assertTrue(result == instance.calculateHiddenNeuronError(n1)); }