@Test public void testSum() { assertEquals(5, calculator.sum(2, 3)); }
@Cacheable("sum") public int sum(int a, int b) { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return a + b; }
Calculator { @Cacheable("sum") public int sum(int a, int b) { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return a + b; } }
Calculator { @Cacheable("sum") public int sum(int a, int b) { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return a + b; }  }
Calculator { @Cacheable("sum") public int sum(int a, int b) { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return a + b; }  @Cacheable("sum") int sum(int a, int b); }
Calculator { @Cacheable("sum") public int sum(int a, int b) { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return a + b; }  @Cacheable("sum") int sum(int a, int b);  }