BackgroundImage extends AbstractCssProperty<BackgroundImage> implements StateChangeInformer<Bean> { public void setAsInitial() { setCssValue(INITIAL); } BackgroundImage();  BackgroundImage(final String cssValue);  BackgroundImage(final BackgroundImage backgroundImage);  BackgroundImage(final String... imageUrls);  BackgroundImage(final UrlCss3Value... urlCss3Values); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BackgroundImage setCssValue(final String cssValue); void setImageUrls(final String... imageUrls); void setImageUrls(final UrlCss3Value... urlCss3Values); List<UrlCss3Value> getUrlCss3Values(); void setAsInitial(); void setAsInherit(); @Override void stateChanged(final Bean stateChangedObject); static final String INITIAL; static final String INHERIT; static final String NONE; }
@Test public void testSetAsInitial() { BackgroundImage backgroundImage = new BackgroundImage(); backgroundImage.setImageUrls("/images/HelloDesign.jpg", "/images/HelloDesign2.jpg"); assertEquals("url(\"/images/HelloDesign.jpg\"), url(\"/images/HelloDesign2.jpg\")", backgroundImage.getCssValue()); assertNotNull(backgroundImage.getUrlCss3Values()); assertEquals(2, backgroundImage.getUrlCss3Values().size()); backgroundImage.setAsInitial(); assertNull(backgroundImage.getUrlCss3Values()); assertEquals(BackgroundImage.INITIAL, backgroundImage.getCssValue()); }