### Question:
Violation { public Rule getRule() { return rule; } Violation(Rule rule, HtmlElement htmlElement, String message); Rule getRule(); String getMessage(); String getPosition(); URL getURL(); @Override String toString();  }### Answer:
@Test public void violationKnowsTheRule() throws Exception { Rule expectedRule = someRule(); assertEquals(expectedRule, new Violation(expectedRule, someElement(), "").getRule()); }