@Test
public void testWriteUTF8FileURLString() throws IOException {

  IoSupport.writeUTF8File(spacesFileURL, sampleText);
  Assert.assertTrue("File " + spacesFile.getAbsolutePath() + " was not created or is not valid", spacesFile.isFile());
  String line = null;
  StringBuilder sb = new StringBuilder();
  BufferedReader br = null;
  try {
    br = new BufferedReader(new InputStreamReader(spacesFileURL.openStream()));
    while ((line = br.readLine()) != null)
      sb.append(line).append('\n');
  } catch (IOException ioe) {
    throw ioe;
  } finally {
    if (br != null)
      br.close();
  }
  Assert.assertEquals("File contents comparison", sampleText, sb.toString());
}