RulesXmlAccess implements RulesAccess { public Rule getRule(int id) { Rule returnRule = null; for (Rule rule : this.getRules().getRule()) { if (rule.getId() == id) { returnRule = rule; break; } } return returnRule; } private  RulesXmlAccess(); private  RulesXmlAccess(URL xmlFile, URL schemaFile); private  RulesXmlAccess(String serializedRule, URL schemaFile); static synchronized RulesAccess getInstance(); static synchronized RulesAccess getInstance(String serializedRule); void validate(); Rule getRule(int id); Rules getRules(); void persist(Rules newRules);  }
@Test public void testCanReadRule() throws IOException { String rule = getRule(); assertNotNull(rule); }