Bump upstreams
[netconf.git] / plugins / netconf-server-mdsal / src / test / java / org / opendaylight / netconf / server / mdsal / operations / AbstractNetconfOperationTest.java
index f9898c5adc1c66babe5c96babaa0abb921c47993..44a96cf8f7eb4f4cbd8434db88a268fbab8aa3c7 100644 (file)
@@ -13,7 +13,7 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.opendaylight.yangtools.yang.test.util.YangParserTestUtils.parseYangResources;
 
-import com.google.common.io.ByteSource;
+import com.google.common.io.CharSource;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.MoreExecutors;
 import java.io.IOException;
@@ -91,13 +91,11 @@ public abstract class AbstractNetconfOperationTest {
         final DOMStore operStore = InMemoryDOMDataStoreFactory.create("DOM-OPER", schemaService);
         final DOMStore configStore = InMemoryDOMDataStoreFactory.create("DOM-CFG", schemaService);
 
-        currentSchemaContext = CurrentSchemaContext.create(schemaService, sourceIdentifier -> {
-            final YangTextSchemaSource yangTextSchemaSource =
-                YangTextSchemaSource.delegateForByteSource(sourceIdentifier, ByteSource.wrap("module test".getBytes()));
-            return Futures.immediateFuture(yangTextSchemaSource);
-        });
+        currentSchemaContext = CurrentSchemaContext.create(schemaService,
+            sourceIdentifier -> Futures.immediateFuture(YangTextSchemaSource.delegateForCharSource(sourceIdentifier,
+                CharSource.wrap("module test"))));
 
-        final EnumMap<LogicalDatastoreType, DOMStore> datastores = new EnumMap<>(LogicalDatastoreType.class);
+        final var datastores = new EnumMap<LogicalDatastoreType, DOMStore>(LogicalDatastoreType.class);
         datastores.put(LogicalDatastoreType.CONFIGURATION, configStore);
         datastores.put(LogicalDatastoreType.OPERATIONAL, operStore);