Add a method to test a hash