Adding Hash test for toByteArray method