### Question:
RSSValidator extends AbstractXMLValidator { @Override protected void validate(Document document) { try { SyndFeedInput input = new SyndFeedInput(); input.build(getDocument()); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (FeedException e) { if (e instanceof ParsingFeedException) { ParsingFeedException pfe = (ParsingFeedException) e; addError(Type.ERROR, pfe.getLineNumber(), pfe.getColumnNumber(), e.getMessage()); } else { addError(Type.ERROR, -1, -1, e.getMessage()); } } }  @Override String getName();  }### Answer:
@Test public void testValidRSS() throws Exception { this.validator.setDocument(getClass().getResourceAsStream("/rss-valid.xml")); this.validator.validate(); assertTrue(this.validator.getErrors().isEmpty(), this.validator.getErrors().toString()); }
@Test public void testInvalidRSS() throws Exception { this.validator.setDocument(getClass().getResourceAsStream("/rss-invalid.xml")); this.validator.validate(); assertEquals(1, this.validator.getErrors().size()); assertEquals("Invalid XML", this.validator.getErrors().get(0).getMessage()); }