statCache test refactoring