Refactor hashCode and equalse in Cable.java