### Question:
PublisherRestriction { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PublisherRestriction that = (PublisherRestriction) o; return purposeId == that.purposeId && restrictionType == that.restrictionType && this.vendorIds.equals(that.vendorIds); } PublisherRestriction(
            int purposeId, RestrictionType restrictionType, IntIterable vendorIds); int getPurposeId(); RestrictionType getRestrictionType(); IntIterable getVendorIds(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEquals() { PublisherRestriction pub1 = new PublisherRestriction(1, RestrictionType.NOT_ALLOWED, BitSetIntIterable.from(1, 2)); PublisherRestriction pub2 = new PublisherRestriction(1, RestrictionType.NOT_ALLOWED, BitSetIntIterable.from(2, 1)); assertEquals(pub1, pub2); assertEquals(pub1, pub1); assertFalse(pub1.equals(null)); }