Production extends ArrayList<Symbol> { @Override @SuppressWarnings({"ForLoopReplaceableByForEach"}) public String toString() { StringBuilder s = new StringBuilder(); for(int i = 0;i<this.size();i++) { s.append(this.get(i).getSymbolString()); } return s.toString(); } Production(int newLength);  Production();  Production(Production copy); boolean getRecursive(); void setRecursive(boolean newRecursive); int getMinimumDepth(); void setMinimumDepth(int newMinimumDepth); int getNTSymbols(); @Override @SuppressWarnings({"ForLoopReplaceableByForEach"}) String toString();  }
@Test public void testToString() { System.out.println("* ProductionTest: toString"); Production instance = new Production(); instance.add(new Symbol("test", Enums.SymbolType.NTSymbol)); instance.add(new Symbol("test", Enums.SymbolType.TSymbol)); String expResult = "testtest"; String result = instance.toString(); assertEquals(expResult, result); }