You should probably reorganize your method. As you understand, a method that takes a file as input is not easy to verify. Furthermore, it seems static, which does not help testing. If you rewrite your method as:
public String fileToString(BufferedReader input) throws IOException
it will be much easier to test. You separate your business logic from the technical characteristics of reading a file. As far as I understand, your business logic reads the stream and ensures that line endings are unix style.
If you do, your method will be checked. You also make it more general: now it can read from a file, from a URL, or from any stream. Better code, easier to check ...
Guillaume
source share