### Question:
SecurityGroupPermission { @Override public boolean equals(Object obj) { if (obj == null) { return false; } else if (obj == this) { return true; } else if (!getClass().isAssignableFrom(obj.getClass())) { return false; } return Arrays.equals(significantAttributes(), getClass().cast(obj).significantAttributes()); } SecurityGroupPermission(Collection<Netmask> netmasks, Range<Integer> portRange); ImmutableSet<Netmask> getNetmasks(); Range<Integer> getPortRange(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void equals() { new EqualsTester() .addEqualityGroup(groupPermission(7000, "1.1.1.1/32"), groupPermission(7000, "1.1.1.1/32")) .addEqualityGroup(groupPermission(7000, "2.2.2.2/32")) .addEqualityGroup(groupPermission(8888, "1.1.1.1/32")) .addEqualityGroup(groupPermission(7000, "1.1.1.1/32", "2.2.2.2/32")) .testEquals(); }