Opacity extends AbstractCssProperty<Opacity> { public void setAsInitial() { setCssValue(INITIAL); } Opacity();  Opacity(final String cssValue);  Opacity(final Opacity opacity);  Opacity(final float value); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); Float getValue(); void setValue(final float value); @Override Opacity setCssValue(final String cssValue); void setAsInitial(); void setAsInherit(); static boolean isValid(final String cssValue); static final String INITIAL; static final String INHERIT; }
@Test public void testSetAsInitial() { Opacity opacity = new Opacity(); opacity.setCssValue("0.5"); assertEquals(Float.valueOf(0.5F), opacity.getValue()); opacity.setAsInitial(); assertEquals(Opacity.INITIAL, opacity.getCssValue()); assertNull(opacity.getValue()); }