void () { String text = """ class Test { public void foo() { System.out.println("test"); } }<caret>"""; init(40, text); type('\n'); VisualPosition position = getEditor().getCaretModel().getVisualPosition(); assertEquals(new VisualPosition(5, 0), position); }