Add test, rename hashCode to hashObjects to remove name conflict.