### Question:
DNDListComponent { public void setInitialPositionY(final HTMLElement dragAndDropElement, final List<HTMLElement> children) { final Integer parentY = Position.getY(dragAndDropElement); final double incrementValue = 0.001; for (int j = 1; j <= children.size(); j++) { final double childPositionY = parentY + (j * incrementValue); final HTMLElement child = children.get(j - 1); Position.setY(child, childPositionY); } } @Inject  DNDListComponent(final View view,
                            final DataTypeList dataTypeList); void refreshItemsPosition(); void refreshItemsCSSAndHTMLPosition(); HTMLElement registerNewItem(final HTMLElement htmlElement); HTMLElement getElement(); HTMLElement getDragArea(); void consolidateYPosition(); Optional<HTMLElement> getPreviousElement(final Element reference); void clear(); void setPositionX(final Element element,
                             final double positionX); void setPositionY(final Element element,
                             final double positionY); int getPositionY(final Element element); void setOnDropItem(final BiConsumer<Element, Element> onDropItem); void refreshDragAreaSize(); void setInitialPositionY(final HTMLElement dragAndDropElement,
                                    final List<HTMLElement> children); void setInitialHiddenPositionY(final HTMLElement itemElement); void highlightLevel(final HTMLElement htmlElement);  }### Answer:
@Test public void testSetInitialPositionY() { final HTMLElement dragAndDropElement = mock(HTMLElement.class); final String parentPosition = "4"; final HTMLElement child0 = mock(HTMLElement.class); final HTMLElement child1 = mock(HTMLElement.class); final HTMLElement child2 = mock(HTMLElement.class); final List<HTMLElement> children = asList(child0, child1, child2); when(dragAndDropElement.getAttribute(DATA_Y_POSITION)).thenReturn(parentPosition); dndListComponent.setInitialPositionY(dragAndDropElement, children); verify(child0).setAttribute(DATA_Y_POSITION, 4.001); verify(child1).setAttribute(DATA_Y_POSITION, 4.002); verify(child2).setAttribute(DATA_Y_POSITION, 4.003); }