CssFile implements Serializable, Cloneable { public String toCssString() { initCssFile(); return cssBlocks.toString(); }  Set<AbstractCssFileBlock> getCssBlocks(); @Override String toString(); String toCssString(); String toCssString(final boolean rebuild); void toOutputStream(final OutputStream os, final String charset); void toOutputStream(final OutputStream os, final String charsetName,
            final boolean rebuild); void toOutputStream(final OutputStream os, final boolean rebuild); void toOutputStream(final OutputStream os, final Charset charset); void toOutputStream(final OutputStream os, final Charset charset,
            final boolean rebuild); void toOutputStream(final OutputStream os); final boolean isOptimizeCssString(); void setOptimizeCssString(final boolean optimizeCssString); boolean isPrependCharset(); void setPrependCharset(final boolean prependCharset);  }
@Test public void testToCssString() { final SampleCssFile sampleCssFile = new SampleCssFile(FontWeight._900); String cssString = sampleCssFile.toCssString(); assertEquals("test-class1{font-style:normal;background-color:green;}test-class11{font-style:normal;background-color:green;}test-class2{font-style:oblique;}test-class3{font-style:oblique;}", cssString); sampleCssFile.getFontWeights().remove(FontWeight._900); cssString = sampleCssFile.toCssString(); assertEquals("test-class1{font-style:normal;background-color:green;}test-class11{font-style:normal;background-color:green;}test-class2{font-style:oblique;}test-class3{font-style:oblique;}", sampleCssFile.toCssString()); }
@Test public void testToCssStringBooleanTrue() { final SampleCssFile sampleCssFile = new SampleCssFile(FontWeight._900); String cssString = sampleCssFile.toCssString(); cssString = sampleCssFile.toCssString(); assertEquals("test-class1{font-style:normal;background-color:green;}test-class11{font-style:normal;background-color:green;}test-class2{font-style:oblique;}test-class3{font-style:oblique;}", cssString); sampleCssFile.getFontWeights().remove(FontWeight._900); cssString = sampleCssFile.toCssString(true); cssString = sampleCssFile.toCssString(true); assertEquals("test-class1{font-style:normal;background-color:green;}test-class11{font-style:normal;background-color:green;}test-class2{font-style:oblique;}", cssString); }
@Test public void testToCssStringBooleanTrue2() { final SampleCssFile sampleCssFile = new SampleCssFile(FontWeight.BOLDER); String cssString = sampleCssFile.toCssString(); cssString = sampleCssFile.toCssString(); assertEquals("test-class1{font-style:normal;background-color:green;}test-class11{font-style:normal;background-color:green;}test-class2{font-style:oblique;}", cssString); }