### Question:
INDArrayHelper { public static INDArray createRnnBatchForShape(long batchSize, long... shape) { long[] batchShape; batchShape = new long[shape.length]; System.arraycopy(shape, 0, batchShape, 0, shape.length); batchShape[0] = 1; batchShape[shape.length - 1] = batchSize; return Nd4j.create(batchShape); }  static INDArray forceCorrectShape(INDArray source); static INDArray createBatchForShape(long batchSize, long... shape); static INDArray createRnnBatchForShape(long batchSize, long... shape);  }### Answer:
@Test public void when_callingCreateRnnBatchForShape_expect_INDArrayWithCorrectShapeAndOriginalShapeUnchanged() { long[] shape = new long[] { 1, 3, 1 }; INDArray output = INDArrayHelper.createRnnBatchForShape(5, shape); assertArrayEquals(new long[] { 1, 3, 5 }, output.shape()); assertArrayEquals(new long[] { 1, 3, 1 }, shape); }