Fixed hashCode() implementations for main classes with adding of corresponding tests