### Question:
Rule { public String toDotString() { return lhs.toDotString() + " \\rightarrow " + rhs.toDotString(); } protected  Rule();  Rule(Sequence lhs, AbstractSequence rhs); Sequence getLhs(); AbstractSequence getRhs(); int getNumber(); Set<Symbol> getTerminals(); @Override String toString(); String toDotString(); int dotLength(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testDotString() { assertEquals("a\\ b \\rightarrow a", ab_a.toDotString()); assertEquals("a\\ b \\rightarrow c\\ d", ab_cd.toDotString()); }