X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fentityownership%2FEntityOwnershipListenerSupportTest.java;h=dc40f0fa9318424ebe32888c97b7516235de95ad;hb=f899094ab7c5ac2a8bfe141b27ba11c5b9e34b02;hp=4acf572851aa114f7789f3010096a3790d12b35a;hpb=5464f50be733df1bbbe31cf05665d542d3b7c5e7;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipListenerSupportTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipListenerSupportTest.java index 4acf572851..dc40f0fa93 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipListenerSupportTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipListenerSupportTest.java @@ -161,25 +161,4 @@ public class EntityOwnershipListenerSupportTest extends AbstractEntityOwnershipT support.addEntityOwnershipListener(entityType1, mockListener2); support.removeEntityOwnershipListener(entityType1, mockListener2); } - - @Test - public void testHasCandidateForEntity() { - EntityOwnershipListenerSupport support = new EntityOwnershipListenerSupport(actorContext, "test"); - DOMEntity entity = new DOMEntity("type", YangInstanceIdentifier.of(QName.create("test", "id"))); - - assertEquals("hasCandidateForEntity", false, support.hasCandidateForEntity(entity)); - - support.setHasCandidateForEntity(entity); - support.setHasCandidateForEntity(entity); // set again - should be noop - assertEquals("hasCandidateForEntity", true, support.hasCandidateForEntity(entity)); - - support.unsetHasCandidateForEntity(entity); - assertEquals("hasCandidateForEntity", false, support.hasCandidateForEntity(entity)); - - support.unsetHasCandidateForEntity(entity); // unset again - should be noop - assertEquals("hasCandidateForEntity", false, support.hasCandidateForEntity(entity)); - - support.setHasCandidateForEntity(entity); - assertEquals("hasCandidateForEntity", true, support.hasCandidateForEntity(entity)); - } }