### Question:
Token extends Symbol { public void setSymbol(Symbol symbol) { setGroup(symbol.getGroup()); setName(symbol.getName()); setType(symbol.getType()); setTableIndex(symbol.getTableIndex()); } Token();  Token(Object data);  Token(Symbol symbol, Object data);  Token(Symbol symbol, Object data, Position position); void appendData(String moreData); Reduction asReduction(); String asString(); int getState(); Object getData(); Position getPosition(); void setState(int state); void setData(Object data); void setPosition(Position position); void setSymbol(Symbol symbol);  }### Answer:
@Test public void testSetSymbol() { Group group = new Group(); Symbol symbol = new Symbol("NewSymbol", SymbolType.NOISE, 3); symbol.setGroup(group); Token token = new Token(new Symbol(), null); token.setSymbol(symbol); assertEquals("name", "NewSymbol", token.getName()); assertEquals("group", group, token.getGroup()); assertEquals("wrong tableIndex", 3, token.getTableIndex()); assertEquals("wrong state", LRState.INITIAL_STATE, token.getState()); }