### Question:
IdentityLinkFunction implements Fn { @Override public double evaluate(final double[] x) { if (x.length > 1) { throw new AIFHError("The linear link function can only accept one parameter."); } return x[0]; }  @Override double evaluate(final double[] x);  }### Answer:
@Test public void testEvaluate() { final IdentityLinkFunction fn = new IdentityLinkFunction(); final double[] x = {2}; final double y = fn.evaluate(x); assertEquals(2, y, AIFH.DEFAULT_PRECISION); }
@Test(expected = AIFHError.class) public void testException() { final IdentityLinkFunction fn = new IdentityLinkFunction(); final double[] x = {1, 2}; fn.evaluate(x); }