### Question:
RecursiveFibonacci { @Requires("0 <= n") @Ensures("0 <= result") public int apply(int n) { if (0 == n || 1 == n) { return n; } else { return apply(n - 1) + apply(n - 2); } }  @Requires("0 <= n") @Ensures("0 <= result") int apply(int n);  }### Answer:
@Test(expected = PreconditionError.class) public void fibOnNegativeFails() { RecursiveFibonacci fib = new RecursiveFibonacci(); fib.apply(-1); }
@Test public void fibOf4() { RecursiveFibonacci fib = new RecursiveFibonacci(); assertEquals(3, fib.apply(4)); }