### Question:
RecurrentActorCriticHelper extends ActorCriticHelper { @Override public void setPolicy(INDArray policy, long idx, int action, double advantage) { policy.putScalar(0, action, idx, advantage); } RecurrentActorCriticHelper(int actionSpaceSize); @Override INDArray createValueLabels(int trainingBatchSize); @Override INDArray createPolicyLabels(int trainingBatchSize); @Override void setPolicy(INDArray policy, long idx, int action, double advantage);  }### Answer:
@Test public void when_callingSetPolicy_expect_advantageSetAtCorrectLocation() { INDArray policyArray = Nd4j.zeros(1, 3, 3); sut.setPolicy(policyArray, 1, 2, 123.0); for(int j = 0; j < 3; ++j) { for(int i = 0; i < 3; ++i) { if(j == 2 && i == 1) { assertEquals(123.0, policyArray.getDouble(0, j, i), 0.00001); } else { assertEquals(0.0, policyArray.getDouble(0, j, i), 0.00001); } } } }