@Test
public void getScrollRange_takesAccountOfMargin() {

    setup(100);
    setChildMargins(20, 30);
    measureAndLayout(100);
    int expected = mNestedScrollView.getScrollRange();
    assertThat(expected, is(50));
}