@Before
 public void setUp() throws Exception {
   this.agent = new Agent();
   agent.getTrace().disableAll();
   this.match = new MatchFunction();
   this.agent.getRhsFunctions().registerHandler(match);
   new CycleCountInput(this.agent.getInputOutput());
   this.agent.initialize();
 }
  private Agent setUpAndRunAgent(String rule) throws Exception {
    final Agent agent = new Agent();

    agent.getTrace().disableAll();
    agent.initialize();

    agent.getProperties().set(SoarProperties.WAITSNC, true);
    agent.getProductions().loadProduction(rule);
    agent.runFor(1, RunType.DECISIONS);
    return agent;
  }