ControllerMap implements Map<C, N> { public boolean add(int index, C controller) { return addAll(index, Collections.singleton(controller)); } ControllerMap(ObservableList<N> nodesList); synchronized N removeWithController(C controller); boolean removeWithNode(N node); boolean add(int index, C controller); boolean add(C controller); boolean addAll(int index, Collection<C> controllers); boolean addAll(Collection<C> controllers); boolean addAll(C... controllers); C getWithNode(N node); @SuppressWarnings("PMD.CompareObjectsWithEquals") void moveByDistance(C controller, int distance); @Override N put(C key, N value); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override N get(Object key); @Override N remove(Object key); @Override void putAll(Map<? extends C, ? extends N> m); @Override void clear(); @Override Set<C> keySet(); @Override Collection<N> values(); @Override Set<Entry<C, N>> entrySet(); void sort(Comparator<? super C> c);  }
@Test @SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert") public void testAdd() throws Exception { interact(() -> { mockPane.controllerMap.add(new MockController()); assertEquals(SIZE_OF_CONTROLLER_NOT_SAME_STRING, 1, mockPane.controllerMap.size()); }); }