Added test cases for Hamming distance function