RgbaCssValue extends AbstractBean<RgbaCssValue> { public void setR(final int r) { if (r < 0 || r > 255) { throw new InvalidValueException( "r paramater accept values only from 0 to 255."); } this.r = r; rgba = "rgba(" + r + ", " + g + ", " + b + ", " + a + ")"; if (getStateChangeInformer() != null) { getStateChangeInformer().stateChanged(this); } } RgbaCssValue();  RgbaCssValue(final String rgbaCssValue);  RgbaCssValue(final RgbaCssValue rgbaCssValue);  RgbaCssValue(final int r, final int g, final int b, final float a); void setRgba(final String rgba); int getR(); void setR(final int r); int getG(); void setG(final int g); int getB(); float getA(); void setB(final int b); void setA(final float a); @Override String toString(); @Override String getValue(); static boolean isValid(final String rgbaString);  }
@Test public void testSetR() { testGetR(); }
@Test(expected = InvalidValueException.class) public void testSetRInvalidValue() { RgbaCssValue rgbCssValue = new RgbaCssValue(); try { rgbCssValue.setR(256); } catch (InvalidValueException e) { rgbCssValue.setR(-1); } }