/**
 * Copyright (c) 2010-2019 Contributors to the openHAB project
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package org.openhab.binding.ihc.internal.ws;

import static org.junit.Assert.fail;

import java.io.IOException;

import org.apache.commons.io.IOUtils;

/**
 * Util class to load file content from resource files.
 *
 * @author Pauli Anttila - Initial contribution
 */
public class ResourceFileUtils {
    static public String getFileContent(String resourceFile) {
        String result = "";
        try {
            result = IOUtils.toString(ResourceFileUtils.class.getClassLoader().getResourceAsStream(resourceFile));
        } catch (IOException e) {
            fail("IOException reading xml file '" + resourceFile + "': " + e);
        }
        return result;
    }
}

@@ -458,16 +458,47 @@
 .fail;%0A%0A
+import java.io.BufferedReader;%0A
 import j
@@ -521,44 +521,126 @@
 on;%0A
-%0A
 import 
-org.apache.commons.io.IOUtil
+java.io.InputStream;%0Aimport java.io.InputStreamReader;%0Aimport java.io.Reader;%0Aimport java.util.stream.Collector
 s;%0A%0A
@@ -862,80 +862,39 @@
     
-S
 tr
-ing result = %22%22;%0A        try %7B%0A            result = IOUtils.toString(
+y (InputStream inputStream = 
 Reso
@@ -963,16 +963,260 @@
 rceFile)
+;%0A                Reader inputStreamReader = new InputStreamReader(inputStream);%0A                BufferedReader bufferedReader = new BufferedReader(inputStreamReader)) %7B%0A            return bufferedReader.lines().collect(Collectors.joining(%22%5Cn%22)
 );%0A     
@@ -1352,14 +1352,10 @@
 urn 
-result
+%22%22
 ;%0A  

Fix tests failing on Windows (#5914)