... instead of the non-generic constants.
Change-Id: I8540db4c2d52185ed0de65eb8b45b75f75cc3f91
Signed-off-by: Stephen Kitt <skitt@redhat.com>
GroupingDefinition grp1 = mock(GroupingDefinition.class);
doReturn(SchemaPath.create(false, QName.create("", "Cont1"), QName.create("", "Cont2"))).when(grp1).getPath();
doReturn(QName.create("", "leaf1")).when(grp1).getQName();
- doReturn(Collections.EMPTY_SET).when(grp1).getUses();
- doReturn(Collections.EMPTY_SET).when(grp1).getGroupings();
- doReturn(Collections.EMPTY_SET).when(grp1).getChildNodes();
+ doReturn(Collections.emptySet()).when(grp1).getUses();
+ doReturn(Collections.emptySet()).when(grp1).getGroupings();
+ doReturn(Collections.emptySet()).when(grp1).getChildNodes();
GroupingDefinition grp2 = mock(GroupingDefinition.class);
doReturn(SchemaPath.create(false, QName.create("", "Cont1"))).when(grp2).getPath();
doReturn(QName.create("", "leaf2")).when(grp2).getQName();
- doReturn(Collections.EMPTY_SET).when(grp2).getUses();
- doReturn(Collections.EMPTY_SET).when(grp2).getGroupings();
- doReturn(Collections.EMPTY_SET).when(grp2).getChildNodes();
+ doReturn(Collections.emptySet()).when(grp2).getUses();
+ doReturn(Collections.emptySet()).when(grp2).getGroupings();
+ doReturn(Collections.emptySet()).when(grp2).getChildNodes();
GroupingDefinition grp3 = mock(GroupingDefinition.class);
doReturn(SchemaPath.create(false, QName.create("", "Cont1"), QName.create("", "Cont2"))).when(grp3).getPath();
doReturn(QName.create("", "leaf3")).when(grp3).getQName();
- doReturn(Collections.EMPTY_SET).when(grp3).getUses();
- doReturn(Collections.EMPTY_SET).when(grp3).getGroupings();
- doReturn(Collections.EMPTY_SET).when(grp3).getChildNodes();
+ doReturn(Collections.emptySet()).when(grp3).getUses();
+ doReturn(Collections.emptySet()).when(grp3).getGroupings();
+ doReturn(Collections.emptySet()).when(grp3).getChildNodes();
GroupingDefinition grp4 = mock(GroupingDefinition.class);
doReturn(SchemaPath.create(false, QName.create("", "Cont1"), QName.create("", "Cont2"),
QName.create("", "List1"))).when(grp4).getPath();
doReturn(QName.create("", "leaf4")).when(grp4).getQName();
- doReturn(Collections.EMPTY_SET).when(grp4).getUses();
- doReturn(Collections.EMPTY_SET).when(grp4).getGroupings();
- doReturn(Collections.EMPTY_SET).when(grp4).getChildNodes();
+ doReturn(Collections.emptySet()).when(grp4).getUses();
+ doReturn(Collections.emptySet()).when(grp4).getGroupings();
+ doReturn(Collections.emptySet()).when(grp4).getChildNodes();
GroupingDefinition grp5 = mock(GroupingDefinition.class);
doReturn(SchemaPath.create(false, QName.create("", "Cont1"))).when(grp5).getPath();
doReturn(QName.create("", "leaf5")).when(grp5).getQName();
- doReturn(Collections.EMPTY_SET).when(grp5).getUses();
- doReturn(Collections.EMPTY_SET).when(grp5).getGroupings();
- doReturn(Collections.EMPTY_SET).when(grp5).getChildNodes();
+ doReturn(Collections.emptySet()).when(grp5).getUses();
+ doReturn(Collections.emptySet()).when(grp5).getGroupings();
+ doReturn(Collections.emptySet()).when(grp5).getChildNodes();
unsortedGroupingDefs.add(grp1);
unsortedGroupingDefs.add(grp1);
assertEquals(packageName + '.' + name, enumeration.getFullyQualifiedName());
assertEquals(reference, enumeration.getReference());
assertEquals(Collections.singletonList(qname), enumeration.getSchemaPath());
- assertEquals(Collections.EMPTY_LIST, enumeration.getEnclosedTypes());
- assertEquals(Collections.EMPTY_LIST, enumeration.getEnumerations());
- assertEquals(Collections.EMPTY_LIST, enumeration.getMethodDefinitions());
- assertEquals(Collections.EMPTY_LIST, enumeration.getConstantDefinitions());
- assertEquals(Collections.EMPTY_LIST, enumeration.getProperties());
- assertEquals(Collections.EMPTY_LIST, enumeration.getImplements());
+ assertEquals(Collections.emptyList(), enumeration.getEnclosedTypes());
+ assertEquals(Collections.emptyList(), enumeration.getEnumerations());
+ assertEquals(Collections.emptyList(), enumeration.getMethodDefinitions());
+ assertEquals(Collections.emptyList(), enumeration.getConstantDefinitions());
+ assertEquals(Collections.emptyList(), enumeration.getProperties());
+ assertEquals(Collections.emptyList(), enumeration.getImplements());
assertNotNull(enumeration.getValues());
assertNotNull(enumeration.getAnnotations());
BindingReflections.getModelRootPackageName("org.opendaylight.yang.gen.v1.test.rev990939"));
assertEquals("ModuleInfoClassName should be equal to string", "test.$YangModuleInfoImpl",
BindingReflections.getModuleInfoClassName("test"));
- assertEquals("Module info should be empty Set", Collections.EMPTY_SET,
+ assertEquals("Module info should be empty Set", Collections.emptySet(),
BindingReflections.loadModuleInfos());
assertFalse("Should not be RpcType", BindingReflections.isRpcType(DataObject.class));
assertFalse("Should not be AugmentationChild", BindingReflections.isAugmentationChild(DataObject.class));
@Test
public void basicTest() throws Exception {
final ShardSubmitCoordinationTask shardSubmitCoordinationTask =
- new ShardSubmitCoordinationTask(DOM_DATA_TREE_IDENTIFIER, Collections.EMPTY_SET, tx);
+ new ShardSubmitCoordinationTask(DOM_DATA_TREE_IDENTIFIER, Collections.emptySet(), tx);
final ShardCanCommitCoordinationTask canCommitCoordinationTask = mock(ShardCanCommitCoordinationTask.class);
doNothing().when(canCommitCoordinationTask).canCommitBlocking();
verify(domNotificationService).registerNotificationListener(domNotificationListener);
doReturn(null).when(domNotificationService).registerNotificationListener(domNotificationListener,
- Collections.EMPTY_SET);
- this.registerNotificationListener(domNotificationListener, Collections.EMPTY_SET);
- verify(domNotificationService).registerNotificationListener(domNotificationListener, Collections.EMPTY_SET);
+ Collections.emptySet());
+ this.registerNotificationListener(domNotificationListener, Collections.emptySet());
+ verify(domNotificationService).registerNotificationListener(domNotificationListener, Collections.emptySet());
}
@Override
verify(domRpcProviderService).registerRpcImplementation(domRpcImplementation);
doReturn(null).when(domRpcProviderService).registerRpcImplementation(domRpcImplementation,
- Collections.EMPTY_SET);
- this.registerRpcImplementation(domRpcImplementation, Collections.EMPTY_SET);
- verify(domRpcProviderService).registerRpcImplementation(domRpcImplementation, Collections.EMPTY_SET);
+ Collections.emptySet());
+ this.registerRpcImplementation(domRpcImplementation, Collections.emptySet());
+ verify(domRpcProviderService).registerRpcImplementation(domRpcImplementation, Collections.emptySet());
}
@Override
assertNotNull(registrationTreeNode.getExactChild(pathArgument));
final NodeWithValue<?> nodeWithValue = new NodeWithValue<>(QName.create("", "testNode"), new Object());
- assertEquals(Collections.EMPTY_LIST, registrationTreeNode.getInexactChildren(nodeWithValue));
- assertEquals(Collections.EMPTY_LIST, registrationTreeNode.getInexactChildren(pathArgument));
+ assertEquals(Collections.emptyList(), registrationTreeNode.getInexactChildren(nodeWithValue));
+ assertEquals(Collections.emptyList(), registrationTreeNode.getInexactChildren(pathArgument));
final NodeIdentifier nodeWithoutValue = new NodeIdentifier(QName.create("", "testNode"));
assertNotNull(registrationTreeNode.ensureChild(nodeWithoutValue));