### Question:
ScrollHelper { public void scrollTo(final Element target, final Element container, final int padding) { final double targetOffsetTop = ((HTMLElement) target).offsetTop; final double containerOffsetTop = ((HTMLElement) container).offsetTop; container.scrollTop = targetOffsetTop - containerOffsetTop - padding; }  void animatedScrollToBottom(final Element element); void scrollToBottom(final Element element); void scrollTo(final Element target,
                         final Element container,
                         final int padding); void scrollTo(final Element target,
                         final Element container);  }### Answer:
@Test public void testScrollToWithTwoArguments() { final Element target = mock(Element.class); final Element container = mock(Element.class); doNothing().when(scrollHelper).scrollTo(any(), any(), anyInt()); scrollHelper.scrollTo(target, container); verify(scrollHelper).scrollTo(target, container, 0); }
@Test public void testScrollToWithThreeArguments() { final HTMLElement target = mock(HTMLElement.class); final HTMLElement container = mock(HTMLElement.class); target.offsetTop = 8; container.offsetTop = 4; scrollHelper.scrollTo(target, container, 2); final Double expectedScrollTop = 2d; final Double actualScrollTop = container.scrollTop; assertEquals(expectedScrollTop, actualScrollTop); }