Opacity extends AbstractCssProperty<Opacity> { public Opacity() { value = Float.valueOf(1F); cssValue = value.toString(); } 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 testOpacity() { Opacity opacity = new Opacity(); assertEquals(Float.valueOf(1F), opacity.getValue()); assertEquals("1.0", opacity.getCssValue()); opacity.setAsInherit(); assertEquals(Opacity.INHERIT, opacity.getCssValue()); assertNull(opacity.getValue()); }