Explain { public List<ExplainChunk> getChunkExplanations() { final List<ExplainChunk> result = new ArrayList<ExplainChunk>(); ExplainChunk c = explain_chunk_list; while(c != null) { result.add(c); c = c.next_chunk; } return result; } Explain(Agent agent); void explain_add_temp_to_backtrace_list(Backtrace temp, LinkedList<Condition> grounds,
            LinkedList<Condition> pots, LinkedList<Condition> locals, LinkedList<Condition> negateds); void explain_add_temp_to_chunk_list(ExplainChunk temp); void reset_explain(); void explain_trace_named_chunk(String chunk_name); void explain_trace(String chunk_name, Backtrace prod_list, Condition ground); void explain_chunk(String chunk_name, int cond_number); void explain_cond_list(String chunk_name); List<ExplainChunk> getChunkExplanations(); void explain_list_chunks(); void explain_full_trace();  }
@Test(timeout=10000) public void testExplainBacktrace() throws Exception { runTest("testExplainBacktrace", 4); final Explain explain = Adaptables.adapt(agent, Explain.class); assertNotNull(explain); final List<ExplainChunk> chunks = explain.getChunkExplanations(); assertEquals(1, chunks.size()); final ExplainChunk c = chunks.get(0); assertEquals("chunk-1*d4*opnochange*1", c.name); assertTrue("Explanation should only have 2 conditions", c.conds.next.next == null); assertTrue("Explanation should only have 1 action", c.actions.next == null); }