void () { configureFromFileText("x.txt", "abc"); assertEquals(StandardCharsets.UTF_8, getVFile().getCharset()); assertNull(getVFile().getBOM()); getVFile().setCharset(StandardCharsets.ISO_8859_1); assertThrows(AssertionError.class, () -> executeAction("AddBom", getEditor(), getProject())); assertNull(getVFile().getBOM()); }