void () { init("cat cat"); EditorTestUtil.addInlay(myFixture.getEditor(), 0); EditorTestUtil.addInlay(myFixture.getEditor(), 4); myFixture.getEditor().getCaretModel().moveToVisualPosition(new VisualPosition(0, 1)); executeAction(); executeAction(); checkResult("<selection><caret>cat</selection> <selection><caret>cat</selection>"); assertEquals(Arrays.asList(new VisualPosition(0, 1), new VisualPosition(0, 6)), ContainerUtil.map(myFixture.getEditor().getCaretModel().getAllCarets(), Caret::getVisualPosition)); }