Add tests for hash functionality