### Question:
Violations { public void add(Violation violation) { violations.add(violation); }  void add(Violation violation); void addAll(Violations violations); boolean hasViolations(); int size(); List<Violation> asList(); @Override String toString();  }### Answer:
@Test public void violationsInstanceWithOneViolationHasViolations() throws Exception { Violations violations = new Violations(); violations.add(someViolation()); assertViolations(violations); }