Split out yang-data-tree-{api,spi}
[yangtools.git] / data / yang-data-tree-spi / src / test / java / org / opendaylight / yangtools / yang / data / tree / spi / DataTreeCandidateNodesTest.java
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.yangtools.yang.data.api.schema.tree;
+package org.opendaylight.yangtools.yang.data.tree.spi;
 
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -18,14 +18,16 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
-import com.google.common.collect.ImmutableList;
 import java.util.Collection;
-import java.util.Collections;
+import java.util.List;
 import java.util.Optional;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode;
+import org.opendaylight.yangtools.yang.data.tree.api.DataTreeModificationCursor;
+import org.opendaylight.yangtools.yang.data.tree.api.ModificationType;
 
 public class DataTreeCandidateNodesTest {
     @Test
@@ -76,9 +78,9 @@ public class DataTreeCandidateNodesTest {
         doReturn(ModificationType.SUBTREE_MODIFIED).when(mockedChildNode3).getModificationType();
         final DataTreeCandidateNode mockedChildNode3ChildNode = mock(DataTreeCandidateNode.class);
         doReturn(ModificationType.DELETE).when(mockedChildNode3ChildNode).getModificationType();
-        doReturn(Collections.singletonList(mockedChildNode3ChildNode)).when(mockedChildNode3).getChildNodes();
+        doReturn(List.of(mockedChildNode3ChildNode)).when(mockedChildNode3).getChildNodes();
 
-        final Collection<DataTreeCandidateNode> childNodes = ImmutableList.of(mockedChildNode1, mockedChildNode2,
+        final Collection<DataTreeCandidateNode> childNodes = List.of(mockedChildNode1, mockedChildNode2,
                 mockedChildNode3);
         doReturn(childNodes).when(mockedDataTreeCandidateNode).getChildNodes();
 
@@ -133,7 +135,7 @@ public class DataTreeCandidateNodesTest {
 
         final DataTreeCandidateNode mockedChildNode1 = mock(DataTreeCandidateNode.class);
         doReturn(ModificationType.DELETE).when(mockedChildNode1).getModificationType();
-        doReturn(Collections.singletonList(mockedChildNode1)).when(mockedDataTreeCandidateNode).getChildNodes();
+        doReturn(List.of(mockedChildNode1)).when(mockedDataTreeCandidateNode).getChildNodes();
 
         DataTreeCandidateNodes.applyRootedNodeToCursor(mockedCursor, mockedRootPath, mockedDataTreeCandidateNode);
         verify(mockedCursor, times(1)).enter((PathArgument) isNull());
@@ -162,7 +164,7 @@ public class DataTreeCandidateNodesTest {
 
         final DataTreeCandidateNode mockedChildNode1 = mock(DataTreeCandidateNode.class);
         doReturn(ModificationType.DELETE).when(mockedChildNode1).getModificationType();
-        doReturn(Collections.singletonList(mockedChildNode1)).when(mockedDataTreeCandidateNode).getChildNodes();
+        doReturn(List.of(mockedChildNode1)).when(mockedDataTreeCandidateNode).getChildNodes();
 
         DataTreeCandidateNodes.applyRootToCursor(mockedCursor, mockedDataTreeCandidateNode);
         verify(mockedCursor, times(1)).delete(isNull());