HslCssValue extends AbstractBean<HslCssValue> { public void setS(final float s) { if (s < 0 || s > 100) { throw new InvalidValueException( "s paramater accept values only from 0 to 100."); } this.s = s; hsl = "hsl(" + h + ", " + s + "%, " + l + "%)"; if (getStateChangeInformer() != null) { getStateChangeInformer().stateChanged(this); } } HslCssValue();  HslCssValue(final String hslCssValue);  HslCssValue(final HslCssValue hslCssValue);  HslCssValue(final int h, final float s, final float l); void setHsl(final String hsl); int getH(); void setH(final int h); float getS(); void setS(final float s); float getL(); static CssLengthUnit getSUnit(); static CssLengthUnit getLUnit(); void setL(final float l); @Override String toString(); @Override String getValue(); static boolean isValid(final String hslString);  }
@Test public void testSetS() { testGetS(); }
@Test(expected = InvalidValueException.class) public void testSetSInvalidValue() { HslCssValue hslCssValue = new HslCssValue(); try { hslCssValue.setS(101); } catch (InvalidValueException e) { hslCssValue.setS(-1); } }