### Question:
Shard { @Override public boolean equals(Object obj) { if( this == obj){ return true; } if( !(obj instanceof Shard)){ return false; } Shard that = (Shard) obj; if( !this.queueName.equalsIgnoreCase(that.queueName)){ return false; } if( !this.region.equalsIgnoreCase(that.region)){ return false; } if( this.shardId != that.shardId){ return false; } if( !this.type.equals(that.type)){ return false; } return true; } Shard(final String queueName, final String region, final Type type, final long shardId, UUID pointer); String getQueueName(); String getRegion(); long getShardId(); Type getType(); UUID getPointer(); void setPointer(UUID pointer); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testEquals(){ Shard shard1 = new Shard("test", "region", Shard.Type.DEFAULT, 100L, null); Shard shard2 = new Shard("test", "region", Shard.Type.DEFAULT, 100L, null); assertEquals(shard1, shard2); }