@Test
public void testListBinarySearchFloor() {

  List<Integer> values = new ArrayList<>();
  assertThat(binarySearchFloor(values, 0, false, false)).isEqualTo(-1);
  assertThat(binarySearchFloor(values, 0, false, true)).isEqualTo(0);
  values.add(1);
  values.add(3);
  values.add(5);
  assertThat(binarySearchFloor(values, 0, false, false)).isEqualTo(-1);
  assertThat(binarySearchFloor(values, 0, true, false)).isEqualTo(-1);
  assertThat(binarySearchFloor(values, 0, false, true)).isEqualTo(0);
  assertThat(binarySearchFloor(values, 0, true, true)).isEqualTo(0);
  assertThat(binarySearchFloor(values, 1, false, false)).isEqualTo(-1);
  assertThat(binarySearchFloor(values, 1, true, false)).isEqualTo(0);
  assertThat(binarySearchFloor(values, 1, false, true)).isEqualTo(0);
  assertThat(binarySearchFloor(values, 1, true, true)).isEqualTo(0);
  assertThat(binarySearchFloor(values, 4, false, false)).isEqualTo(1);
  assertThat(binarySearchFloor(values, 4, true, false)).isEqualTo(1);
  assertThat(binarySearchFloor(values, 5, false, false)).isEqualTo(1);
  assertThat(binarySearchFloor(values, 5, true, false)).isEqualTo(2);
  assertThat(binarySearchFloor(values, 6, false, false)).isEqualTo(2);
  assertThat(binarySearchFloor(values, 6, true, false)).isEqualTo(2);
}