EolHelper { public static String findEolDefaultToOs(File textFile) throws IOException { String eol = findEol(textFile); return (eol == null ? System.lineSeparator() : eol); }  @SuppressFBWarnings("DM_DEFAULT_ENCODING") static String findEol(File textFile); static String findEolDefaultToOs(File textFile); static String removeEol(String line); static boolean startsWithEol(String line); static boolean endsWithEol(String line); static String getStartEol(String line); static String getEndEol(String line);  }
@Test public void findEolDefaultToOsTest() throws IOException, URISyntaxException { File file = new File(EolHelperTest.class.getResource("/billy.yaml").toURI()); Assert.assertEquals(EolHelper.findEolDefaultToOs(file), "\n"); file = new File(EolHelperTest.class.getResource("/oneLineFile.txt").toURI()); Assert.assertEquals(EolHelper.findEolDefaultToOs(file), "\n"); }