@Test
public void testShouldContinueLoading_untilMaxBufferExceeded() {

  createDefaultLoadControl();
  assertThat(loadControl.shouldContinueLoading(/* bufferedDurationUs= */ 0, SPEED)).isTrue();
  assertThat(loadControl.shouldContinueLoading(MIN_BUFFER_US, SPEED)).isTrue();
  assertThat(loadControl.shouldContinueLoading(MAX_BUFFER_US - 1, SPEED)).isTrue();
  assertThat(loadControl.shouldContinueLoading(MAX_BUFFER_US, SPEED)).isFalse();
}