void () { RangeMarkerImpl marker = (RangeMarkerImpl)createMarker("ab", 1, 1); marker.setStickingToRight(true); insertString(marker.getDocument(), 1, " "); assertTrue(marker.isValid()); assertEquals(2, marker.getStartOffset()); assertEquals(2, marker.getEndOffset()); }