@Test public void getLockInstance1() { ConsumePartition consumePartition = new ConsumePartition(); consumePartition.setPartition(partition); consumePartition.setTopic(topic); consumePartition.setApp(app); ConsumePartition consumePartition2 = new ConsumePartition(); consumePartition2.setPartition(partition); consumePartition2.setTopic(topic); consumePartition2.setApp(app); ConsumePartition lockInstance = partitionLockInstance.getLockInstance(consumePartition); ConsumePartition lockInstance2 = partitionLockInstance.getLockInstance(consumePartition2); Assert.assertEquals(lockInstance, lockInstance2); ConsumePartition consumePartition3 = new ConsumePartition(); consumePartition3.setPartition((short) 2); consumePartition3.setTopic(topic); consumePartition3.setApp(app); ConsumePartition lockInstance3 = partitionLockInstance.getLockInstance(consumePartition3); Assert.assertNotEquals(lockInstance, lockInstance3); }
public ConsumePartition getLockInstance(String topic, String app, short partition) { ConsumePartition consumePartition = new ConsumePartition(topic, app, partition); return getLockInstance(consumePartition); }
PartitionLockInstance { public ConsumePartition getLockInstance(String topic, String app, short partition) { ConsumePartition consumePartition = new ConsumePartition(topic, app, partition); return getLockInstance(consumePartition); } }
PartitionLockInstance { public ConsumePartition getLockInstance(String topic, String app, short partition) { ConsumePartition consumePartition = new ConsumePartition(topic, app, partition); return getLockInstance(consumePartition); }  }
PartitionLockInstance { public ConsumePartition getLockInstance(String topic, String app, short partition) { ConsumePartition consumePartition = new ConsumePartition(topic, app, partition); return getLockInstance(consumePartition); }  ConsumePartition getLockInstance(String topic, String app, short partition); ConsumePartition getLockInstance(ConsumePartition consumePartition); }
PartitionLockInstance { public ConsumePartition getLockInstance(String topic, String app, short partition) { ConsumePartition consumePartition = new ConsumePartition(topic, app, partition); return getLockInstance(consumePartition); }  ConsumePartition getLockInstance(String topic, String app, short partition); ConsumePartition getLockInstance(ConsumePartition consumePartition);  }