### Question:
NoRollbackRule extends RollbackRule { @Override public boolean equals(Object other) { return super.equals(other); } NoRollbackRule(Class<?> clazz);  NoRollbackRule(String exceptionName); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); static final NoRollbackRule DEFAULT_NO_ROLLBACK_RULE; }### Answer:
@Test public void equalsTest(){ RollbackRule rollbackRuleByClass = new NoRollbackRule(Exception.class); RollbackRule otherRollbackRuleByClass = new NoRollbackRule(Exception.class); Assertions.assertEquals(rollbackRuleByClass, otherRollbackRuleByClass); RollbackRule rollbackRuleByName = new NoRollbackRule(Exception.class.getName()); RollbackRule otherRollbackRuleByName = new NoRollbackRule(Exception.class.getName()); Assertions.assertEquals(rollbackRuleByName, otherRollbackRuleByName); NoRollbackRule otherRollbackRuleByName3 = new NoRollbackRule(Exception.class.getName()); Assertions.assertEquals(otherRollbackRuleByName3.toString(),"NoRollbackRule with pattern [" + Exception.class.getName() + "]"); }