void (@NonNls String text, @NonNls String expected, @Nullable String expectedSeparator) { LightVirtualFile vFile = new LightVirtualFile("test.txt"); CharSequence real = LoadTextUtil.getTextByBinaryPresentation(text.getBytes(StandardCharsets.US_ASCII), vFile); assertTrue("content", Comparing.equal(expected, real)); if (expectedSeparator != null) { assertEquals("detected line separator", expectedSeparator, FileDocumentManager.getInstance().getLineSeparator(vFile, null)); } }