### Question:
PublisherRestriction { @Override public String toString() { StringJoiner sj = new StringJoiner(", ", "[", "]"); for (IntIterator i = getVendorIds().intIterator(); i.hasNext();) { sj.add(i.next().toString()); } return "PublisherRestriction{" + "purposeId=" + purposeId + ", restrictionType=" + restrictionType + ", vendorIds=" + sj.toString() + '}'; } 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 testToString() { PublisherRestriction publisherRestriction = new PublisherRestriction(1, RestrictionType.NOT_ALLOWED, BitSetIntIterable.from(1, 2)); assertEquals( "PublisherRestriction{purposeId=1, restrictionType=NOT_ALLOWED, vendorIds=[1, 2]}", publisherRestriction.toString()); }