ControllerMap implements Map<C, N> { public boolean addAll(int index, Collection<C> controllers) { controllerNodeMap.putAll(controllers.stream().collect(Collectors.toMap(Function.identity(), c -> (N) c.getRoot()))); return addAllNodesToObservable(index, (List<N>) controllers.stream().map(Controller ::getRoot).collect(Collectors.toList())); } 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 testAddAll() throws Exception { interact(() -> { mockPane.controllerMap.addAll(new MockController(), new MockController()); assertEquals(SIZE_OF_CONTROLLER_NOT_SAME_STRING, 2, mockPane.controllerMap.size()); }); }