FibonacciRpcEndpoint implements FibonacciEndpoint { @Override public long term(int n) { return fibonacciService.term(n); } @Autowired  FibonacciRpcEndpoint(FibonacciService fibonacciService); @Override long term(int n);  }
@Test public void providesFibonacciTermWithUnderlyingService() { when(fibonacciService.term(term)).thenReturn(expected); long fibo = fibonacciRpcApi.term(term); assertThat(fibo).isEqualTo(expected); }