refactor model cache tests