Do not rely on default charset for test resources
[yangtools.git] / yang / yang-data-codec-gson / src / test / java / org / opendaylight / yangtools / yang / data / codec / gson / Bug5446Test.java
index bae4da98506ffe2f6ce066dde0723957986226d7..94b999d34105a04939cd40d126fa83553269fac7 100644 (file)
@@ -20,6 +20,7 @@ import java.io.StringWriter;
 import java.io.Writer;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
 import java.util.Base64;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -68,7 +69,7 @@ public class Bug5446Test {
         final JsonParser parser = new JsonParser();
         final JsonElement serializedJson = parser.parse(jsonOutput);
         final JsonElement expextedJson = parser.parse(new FileReader(new File(getClass().getResource(
-                "/bug5446/json/foo.json").toURI())));
+                "/bug5446/json/foo.json").toURI()), StandardCharsets.UTF_8));
 
         assertEquals(expextedJson, serializedJson);
     }