@Test
public void testMemorizedCallable() throws Exception  {

  MemorizedCallable<String> mc = new MemorizedCallable(new Callable() {
    private int i  = 0;
    @Override
    public Object call()  {
      return "val" + (i++);
    }
  });
  Assert.assertEquals("val0", mc.call());
  Assert.assertEquals("val0", mc.call());
  mc.clear();
  Assert.assertEquals("val1", mc.call());
}