### Question:
CompoundNetworkHandler implements INetworkHandler { @Override public void notifyGradientCalculation() { for(INetworkHandler handler : networkHandlers) { handler.notifyGradientCalculation(); } } CompoundNetworkHandler(INetworkHandler... networkHandlers); @Override void notifyGradientCalculation(); @Override void notifyIterationDone(); @Override void performFit(FeaturesLabels featuresLabels); @Override void performGradientsComputation(FeaturesLabels featuresLabels); @Override void fillGradientsResponse(Gradients gradients); @Override void applyGradient(Gradients gradients, long batchSize); @Override INDArray[] recurrentStepOutput(Observation observation); @Override INDArray[] batchOutput(INDArray batch); @Override void resetState(); @Override INetworkHandler clone(); @Override void copyFrom(INetworkHandler from);  }### Answer:
@Test public void when_callingNotifyGradientCalculation_expect_listenersNotified() { setup(false); sut.notifyGradientCalculation(); verify(handler1, times(1)).notifyGradientCalculation(); verify(handler2, times(1)).notifyGradientCalculation(); }