writing cache tests is proving very difficult