### Question:
BaseNetwork implements ITrainableNeuralNet<NET_TYPE> { @Override public void reset() { invalidateCache(); if(isRecurrent()) { networkHandler.resetState(); } } protected  BaseNetwork(INetworkHandler networkHandler); boolean isRecurrent(); @Override void fit(FeaturesLabels featuresLabels); @Override Gradients computeGradients(FeaturesLabels featuresLabels); @Override void applyGradients(Gradients gradients); @Override NeuralNetOutput output(Observation observation); NeuralNetOutput output(INDArray batch); @Override void reset(); void copyFrom(BaseNetwork from); abstract NET_TYPE clone();  }### Answer:
@Test public void when_callingResetOnNonRecurrent_expect_handlerNotCalled() { setup(false); sut.reset(); verify(handlerMock, never()).resetState(); }
@Test public void when_callingResetOnRecurrent_expect_handlerIsCalled() { setup(true); sut.reset(); verify(handlerMock, times(1)).resetState(); }