@Test public void testEmptyPool(){ try { tracePool.getExecutionTrace(""); Assert.fail("IllegalArgumentException is expected!"); }catch (IllegalArgumentException e){ assert (e.getMessage().equals("Coverage data of test "+""+" is not available!")); } }
public ExecutionTrace getExecutionTrace(String testName){ if(!this.pool.containsKey(testName)){ throw new IllegalArgumentException("Coverage data of test "+testName+" is not available!"); } return this.pool.get(testName); }
ExecutionTracePool { public ExecutionTrace getExecutionTrace(String testName){ if(!this.pool.containsKey(testName)){ throw new IllegalArgumentException("Coverage data of test "+testName+" is not available!"); } return this.pool.get(testName); } }
ExecutionTracePool { public ExecutionTrace getExecutionTrace(String testName){ if(!this.pool.containsKey(testName)){ throw new IllegalArgumentException("Coverage data of test "+testName+" is not available!"); } return this.pool.get(testName); } private  ExecutionTracePool(); }
ExecutionTracePool { public ExecutionTrace getExecutionTrace(String testName){ if(!this.pool.containsKey(testName)){ throw new IllegalArgumentException("Coverage data of test "+testName+" is not available!"); } return this.pool.get(testName); } private  ExecutionTracePool(); static ExecutionTracePool getInstance(); void registerNewCoverageData(String testName, ExecutionTrace executionTrace); Set<String> getExecutedTests(); ExecutionTrace getExecutionTrace(String testName); Collection<ExecutionTrace> getExecutionTraces(); void clear(); }
ExecutionTracePool { public ExecutionTrace getExecutionTrace(String testName){ if(!this.pool.containsKey(testName)){ throw new IllegalArgumentException("Coverage data of test "+testName+" is not available!"); } return this.pool.get(testName); } private  ExecutionTracePool(); static ExecutionTracePool getInstance(); void registerNewCoverageData(String testName, ExecutionTrace executionTrace); Set<String> getExecutedTests(); ExecutionTrace getExecutionTrace(String testName); Collection<ExecutionTrace> getExecutionTraces(); void clear();  }