fix IllegalArgumentException in EclipseCursorAndSelection

Suppose I have this two lines:

    import static net.sourceforge.vrapper.keymap.StateUtils.union;
    import static net.sourceforge.vrapper.keymap.vim.ConstructorWrappers.leafBind;

If I put the cursor over the i in the first `import` and enter visual mode, then search for "import" and hit enter, then, without leaving visual mode, search for "static" and hit enter, nothing happens and an IllegalArgumentException is thrown.
Apparently the reason is Windows new lines(\r\n).  
I found in other class that in this situations the way to go is to step back one character and try again.

Where can I look in order to learn how to make a test for "Search in VisualMode"?