### Question:
BasicRuleSet implements RuleSet { @Override public String toString() { return getClass().getSimpleName() + "[" + (rules.isEmpty() ? "<Empty RuleSet>" : StringUtils.join(collectRuleNames(), ", ")) + "]"; } BasicRuleSet(Rule... rules); void addRule(Rule rule); BasicRuleSet withRule(Rule rule); @Override List<Rule> getRules(); @Override Violations applyTo(HtmlPage htmlPage); @Override String toString();  }### Answer:
@Test public void toStringReturnsReadableStringForEmptyListOfRules() throws Exception { String expectedString = ruleSet.getClass().getSimpleName() + "[<Empty RuleSet>]"; assertEquals(expectedString, ruleSet.toString()); }