Remove some misplaced assertions.
Add test for is_cached method.