    @Test
    public void testMemoize1() {

        final AtomicInteger count = new AtomicInteger(0);
        Func1<Integer, MyObject> memoized = RxMemoization.memoize(new Func1<Integer, MyObject>() {
            @Override
            public MyObject call(Integer integer) {
                count.incrementAndGet();
                return INSTANCES.get(integer);
            }
        });
        Assert.assertEquals(INSTANCES.get(0), memoized.call(0));
        Assert.assertEquals(INSTANCES.get(0), memoized.call(0));
        Assert.assertEquals(INSTANCES.get(0), memoized.call(0));
        Assert.assertEquals(INSTANCES.get(1), memoized.call(1));
        Assert.assertEquals(INSTANCES.get(1), memoized.call(1));
        Assert.assertEquals(INSTANCES.get(1), memoized.call(1));
        Assert.assertEquals(INSTANCES.get(30), memoized.call(30));
        Assert.assertEquals(INSTANCES.get(30), memoized.call(30));
        Assert.assertEquals(INSTANCES.get(30), memoized.call(30));
        Assert.assertEquals(INSTANCES.get(0), memoized.call(0));
        Assert.assertEquals(INSTANCES.get(0), memoized.call(0));
        Assert.assertEquals(INSTANCES.get(0), memoized.call(0));
        Assert.assertEquals(3, count.get());
    }