@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof OutboundPacket) {
            final DefaultOutboundPacket other = (DefaultOutboundPacket) obj;
            return Objects.equals(this.sendThrough, other.sendThrough) &&
                    Objects.equals(this.treatment, other.treatment) &&
                    Objects.equals(this.data, other.data) &&
                    Objects.equals(this.inPort, other.inPort);
        }
        return false;
    }
@Test
    public void testEquals() {
        new EqualsTester()
                .addEqualityGroup(packet1, sameAsPacket1)
                .addEqualityGroup(packet2)
                .addEqualityGroup(packet1WithInPort)
                .testEquals();
    }