Cursor extends AbstractCssProperty<Cursor> implements StateChangeInformer<Bean> { public void setCursorUrls(final String cursorType, final String... cursorUrls) { if (cursorType == null) { throw new NullValueException("cursorType is null"); } if (cursorUrls == null) { throw new NullValueException("cursorUrls is null"); } if (!ALL_CURSORTYPES .contains(StringUtil.strip(cursorType).toLowerCase())) { throw new InvalidValueException(cursorType + " is invalid. The cursorType should be any predefined cursor type, eg default, auto etc.."); } final StringBuilder sb = new StringBuilder(); for (final String cursorUrl : cursorUrls) { final String urlString = "url(\"".concat(cursorUrl).concat("\"), "); sb.append(urlString); } String cssValue = sb.toString(); cssValue = cssValue.endsWith(", ") ? cssValue.concat(cursorType) : cursorType; setCssValue(cssValue); this.cursorType = cursorType; this.cursorUrls = cursorUrls; } Cursor();  Cursor(final String cssValue);  Cursor(final Cursor cursor);  Cursor(final String cursorType, final String... cursorUrls);  Cursor(final String cursorType,
            final UrlCss3Value... urlCss3Values); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override Cursor setCssValue(final String cssValue); void setCursorType(final String cursorType); String getCursorType(); String[] getCursorUrls(); void setCursorUrls(final String cursorType,
            final String... cursorUrls); void setCursorUrls(final String cursorType,
            final UrlCss3Value... urlCss3Values); List<UrlCss3Value> getUrlCss3Values(); static String[] getAllCursorTypes(); @Override void stateChanged(final Bean stateChangedObject); static final String ALIAS; static final String ALL_SCROLL; static final String AUTO; static final String CELL; static final String CONTEXT_MENU; static final String COL_RESIZE; static final String COPY; static final String CROSSHAIR; static final String DEFAULT; static final String E_RESIZE; static final String EW_RESIZE; static final String GRAB; static final String GRABBING; static final String HELP; static final String MOVE; static final String N_RESIZE; static final String NE_RESIZE; static final String NESW_RESIZE; static final String NS_RESIZE; static final String NW_RESIZE; static final String NWSE_RESIZE; static final String NO_DROP; static final String NONE; static final String NOT_ALLOWED; static final String POINTER; static final String PROGRESS; static final String ROW_RESIZE; static final String S_RESIZE; static final String SE_RESIZE; static final String SW_RESIZE; static final String TEXT; static final String VERTICAL_TEXT; static final String W_RESIZE; static final String WAIT; static final String ZOOM_IN; static final String ZOOM_OUT; static final String INITIAL; static final String INHERIT; }
@Test(expected = InvalidValueException.class) public void testSetCursorUrlsStringStringArrayInvalidValue() { Cursor cursor = new Cursor(); cursor.setCursorUrls("/cursors/One.png", "/cursors/Two.svg", "/cursors/Three.jpg"); }