### Question:
InitialStateCalculator { protected RealVector calculateZID() { double[] bSubArray = new double[numberOfCoefficients-1]; double[] aSubArray = new double[numberOfCoefficients-1]; System.arraycopy(bCoefficients, 1, bSubArray, 0, bSubArray.length); System.arraycopy(aCoefficients, 1, aSubArray, 0, aSubArray.length); RealVector bVector = new ArrayRealVector(bSubArray); RealVector aVector = new ArrayRealVector(aSubArray); RealVector zid = bVector.subtract(aVector.mapMultiply(bCoefficients[0])); return zid; } InitialStateCalculator(FilterCoefficients filterCoefficients); double[] getInitialState(); double[] growSignal(double[] signal); double[] growSignal(double[] signal, boolean leftOnly);  }### Answer:
@Test public void testCalculateZID() { InitialStateCalculator calculator = new InitialStateCalculator(getSampleFilterCoefficients1()); RealVector actual = calculator.calculateZID(); RealVector expected = new ArrayRealVector(new double[] {0.00236855, 0.00024174, 0.00072069}); assertVectorEquals(expected, actual, 1e-7); calculator = new InitialStateCalculator(getSampleFilterCoefficients2()); actual = calculator.calculateZID(); expected = new ArrayRealVector(new double[] {0.389, 0.35, 0.1, 0.7, 0.4}); assertVectorEquals(expected, actual, 1e-7); }