Add tests for typed hashes with key constraints