as_hash test