CssFileProcessor implements ReadingProcessor { public CssFile getCss() { return css; } CssFileProcessor(); void process(final int i); CssFile getCss();  }
@Test public void parseCSS() throws IOException { retriever.processFromStream(CSSFileProcessorTest.class.getResourceAsStream("/css/test.css"), proc); CssFile file = proc.getCss(); List<CssRule> rules = file.get(new Tag("body")); Assert.assertTrue(rules.size() == 1); Assert.assertTrue("margin not found.", rules.get(0).getNormalDeclarations().containsKey("margin")); Assert.assertEquals("Value for margin not correct.", "20px", rules.get(0).getNormalDeclarations().get("margin")); }