BUG-2839: remove dependencies on commons-io
[controller.git] / opendaylight / netconf / config-persister-impl / src / test / java / org / opendaylight / controller / netconf / persist / impl / CapabilityStrippingConfigSnapshotHolderTest.java
index b22924a722878ca455ee1631793cb4aa9466cbe7..554e13487ba52468a664ff0babeaf577d2c2c061 100644 (file)
@@ -8,12 +8,12 @@
 package org.opendaylight.controller.netconf.persist.impl;
 
 import static org.junit.Assert.assertEquals;
-
+import com.google.common.base.Charsets;
 import com.google.common.collect.Sets;
+import com.google.common.io.Resources;
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.commons.io.IOUtils;
 import org.junit.Test;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Element;
@@ -36,11 +36,11 @@ public class CapabilityStrippingConfigSnapshotHolderTest {
     }
 
     private Set<String> readLines(String fileName) throws IOException {
-        return new HashSet<>(IOUtils.readLines(getClass().getResourceAsStream(fileName)));
+        return new HashSet<>(Resources.readLines(getClass().getResource(fileName), Charsets.UTF_8));
     }
 
     private String readToString(String fileName) throws IOException {
-        return IOUtils.toString(getClass().getResourceAsStream(fileName));
+        return Resources.toString(getClass().getResource(fileName), Charsets.UTF_8);
     }
 
 }