@Test public void testGetSortedDraggableElements() { final String selector = ".kie-dnd-draggable"; final HTMLElement element0 = mock(HTMLElement.class); final HTMLElement element1 = mock(HTMLElement.class); final HTMLElement element2 = mock(HTMLElement.class); final NodeList<Element> nodeList = spy(new NodeList<>()); nodeList.length = 3; doReturn(element0).when(nodeList).getAt(0); doReturn(element1).when(nodeList).getAt(1); doReturn(element2).when(nodeList).getAt(2); doReturn("1").when(element0).getAttribute(DATA_Y_POSITION); doReturn("0").when(element1).getAttribute(DATA_Y_POSITION); doReturn("-1").when(element2).getAttribute(DATA_Y_POSITION); doReturn(nodeList).when(element).querySelectorAll(selector); final List<HTMLElement> actualElements = querySelector(element).getSortedDraggableElements(); final List<HTMLElement> expectElements = asList(element2, element1, element0); assertEquals(expectElements, actualElements); }
static QuerySelector querySelector(final Element container) { return new QuerySelector(container); }
DNDListDOMHelper { static QuerySelector querySelector(final Element container) { return new QuerySelector(container); } }
DNDListDOMHelper { static QuerySelector querySelector(final Element container) { return new QuerySelector(container); }  }
DNDListDOMHelper { static QuerySelector querySelector(final Element container) { return new QuerySelector(container); }   }
DNDListDOMHelper { static QuerySelector querySelector(final Element container) { return new QuerySelector(container); }   static final String DRAGGING; }