Add another alternative SchemaContextUtil.findDataSchemaNode()
[yangtools.git] / yang / yang-model-util / src / test / java / org / opendaylight / yangtools / yang / model / util / DataNodeIteratorTest.java
index bab599b3eecbfafd15ceef7ec5b288601cc98054..41eb9b233d42a67f20bddb5208509efbf015167a 100644 (file)
@@ -22,7 +22,7 @@ import java.util.SortedMap;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.CaseSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
@@ -55,9 +55,7 @@ public class DataNodeIteratorTest {
     }
 
     private static <T extends OperationDefinition> T mockOperationDefinition(final T mock) {
-        doReturn(Collections.emptySet()).when(mock).getGroupings();
         doReturn(Collections.emptySet()).when(mock).getTypeDefinitions();
-        doReturn(mockDataNodeContainer(ContainerSchemaNode.class)).when(mock).getInput();
         doReturn(mockDataNodeContainer(ContainerSchemaNode.class)).when(mock).getOutput();
         return mock;
     }
@@ -86,11 +84,11 @@ public class DataNodeIteratorTest {
     @Test
     public void createDataNodeIteratorWith() {
         assertFalse("Has no next", dataNodeIterator.hasNext());
-        assertEquals("Should be empty list", Collections.EMPTY_LIST, dataNodeIterator.allChoices());
-        assertEquals("Should be empty list", Collections.EMPTY_LIST, dataNodeIterator.allContainers());
-        assertEquals("Should be empty list", Collections.EMPTY_LIST, dataNodeIterator.allTypedefs());
-        assertEquals("Should be empty list", Collections.EMPTY_LIST, dataNodeIterator.allGroupings());
-        assertEquals("Should be empty list", Collections.EMPTY_LIST, dataNodeIterator.allLists());
+        assertEquals("Should be empty list", Collections.emptyList(), dataNodeIterator.allChoices());
+        assertEquals("Should be empty list", Collections.emptyList(), dataNodeIterator.allContainers());
+        assertEquals("Should be empty list", Collections.emptyList(), dataNodeIterator.allTypedefs());
+        assertEquals("Should be empty list", Collections.emptyList(), dataNodeIterator.allGroupings());
+        assertEquals("Should be empty list", Collections.emptyList(), dataNodeIterator.allLists());
     }
 
     @Test