def METHOD_NAME(self, mocker):
    """Test time expiration works as expected."""
    user_func = mocker.Mock()
    k = 0
    user_func.side_effect = lambda *p, **kw: len(p[0]) + k
    key_func = mocker.Mock()
    key_func.side_effect = lambda *p, **kw: p[0]
    cache = cache_trait.LocalMemoryCache(key_func, user_func, 1, 5)
    assert cache.get('key') == 3
    assert cache.get('other') == 5
    k = 1
    assert cache.get('key') == 3  # cached key retains value until it's expired
    assert cache.get('other') == 5  # cached key retains value until it's expired
    assert cache.get('kkk') == 4  # non-cached key calls function anyway and gets new result.
    time.sleep(1)
    assert cache.get('key') == 4
    assert cache.get('other') == 6