### Question:
HistoryProcessor implements IHistoryProcessor { public HistoryProcessor(Configuration conf) { this.conf = conf; history = new CircularFifoQueue<>(conf.getHistoryLength()); } HistoryProcessor(Configuration conf); void add(INDArray obs); void startMonitor(String filename, int[] shape); void stopMonitor(); boolean isMonitoring(); void record(INDArray pixelArray); INDArray[] getHistory(); double getScale(); void waitKP(); void show(Mat m);  }### Answer:
@Test public void testHistoryProcessor() { HistoryProcessor.Configuration conf = HistoryProcessor.Configuration.builder() .croppingHeight(2).croppingWidth(2).rescaledHeight(2).rescaledWidth(2).build(); IHistoryProcessor hp = new HistoryProcessor(conf); INDArray a = Nd4j.createFromArray(new float[][][] {{{0.1f, 0.1f, 0.1f}, {0.2f, 0.2f, 0.2f}}, {{0.3f, 0.3f, 0.3f}, {0.4f, 0.4f, 0.4f}}}); hp.add(a); hp.add(a); hp.add(a); hp.add(a); INDArray[] h = hp.getHistory(); assertEquals(4, h.length); assertEquals( 1, h[0].shape()[0]); assertEquals(a.shape()[0], h[0].shape()[1]); assertEquals(a.shape()[1], h[0].shape()[2]); assertEquals(0.1f * hp.getScale(), h[0].getDouble(0, 0, 0), 1); assertEquals(0.2f * hp.getScale(), h[0].getDouble(0, 0, 1), 1); assertEquals(0.3f * hp.getScale(), h[0].getDouble(0, 1, 0), 1); assertEquals(0.4f * hp.getScale(), h[0].getDouble(0, 1, 1), 1); }