refactored store tests to share common code