### Question:
PetriNetController implements Serializable { public void createNewToken(String name, Color color) { Token token = new ColoredToken(name, color); petriNet.addToken(token); } PetriNetController(PetriNet model, UndoableEditListener undoListener, GUIAnimator animator,
                              CopyPasteManager copyPasteManager, ZoomController zoomController,
                              PetriNetTab petriNetTab); PetriNetTab getPetriNetTab(); String getUniquePlaceName(); String getUniqueTransitionName(); boolean isSelected(PetriNetComponent component); void deselect(PetriNetComponent component); void deselectAll(); void translateSelected(Point translation); void select(Rectangle selectionRectangle); void select(PetriNetComponent component); List<UndoableEdit> deleteSelection(); UndoableEdit delete(PetriNetComponent component); void createNewToken(String name, Color color); Collection<Token> getNetTokens(); void updateToken(String currentTokenName, String name, Color color); PetriNet getPetriNet(); ArcController<S, T> getArcController(Arc<S, T> arc); PlaceController getPlaceController(Place place); AnnotationController getAnnotationController(Annotation annotation); TransitionController getTransitionController(final Transition transition); RateParameterController getRateParameterController(final String rateParameter); void selectToken(String tokenName); Token getToken(String name); void copySelection(); boolean isCopyInProgress(); void cancelPaste(); String getSelectedToken(); GUIAnimator getAnimator(); ZoomController getZoomController(); void paste(); DragManager getDragManager(); Collection<RateParameter> getRateParameters(); boolean isUniqueName(String id); boolean hasChanged(); void save(); FunctionalResults<Double> parseFunctionalExpression(String expr); UndoManager getUndoManager(); Set<PetriNetComponent> getSelectedComponents(); UndoableEditListener getUndoListener(); boolean toggleAnimation(); boolean isInAnimationMode(); SelectionManager getSelectionManager();  }### Answer:
@Test public void createNewToken() { String name = "testToken"; boolean enabled = true; Color color = new Color(160, 92, 240); controller.createNewToken(name, color); Collection<Token> tokens = net.getTokens(); assertEquals(1, tokens.size()); Token token = tokens.iterator().next(); assertEquals(name, token.getId()); assertEquals(color, token.getColor()); }