### Question:
RuleFactory { public Rule getRenamingRule(String targetName) { return new Renaming(targetName); } private  RuleFactory(); static RuleFactory getInstance(); Rule getRenamingRule(String targetName); Rule getRule(String specification); Rule getRule(String specification, String targetName);  }### Answer:
@Test public void testGetRenamingRule() { final Rule rule = RuleFactory.getInstance().getRenamingRule("R"); assertTrue(rule instanceof Renaming); }