### Question:
RollbackRule implements Serializable { @Override public String toString() { return "RollbackRule with pattern [" + this.exceptionName + "]"; } RollbackRule(String exceptionName);  RollbackRule(Class<?> clazz); String getExceptionName(); int getDepth(Throwable ex); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void toStringTest(){ RollbackRule otherRollbackRuleByName = new RollbackRule(Exception.class.getName()); Assertions.assertEquals(otherRollbackRuleByName.toString(), String.format("RollbackRule with pattern [%s]", Exception.class.getName())); }