@Test
public void testAddIfNotPresentToIndex() {

  List<String> list = new ArrayList<>();
  list.add(foo);
  assertAll(
      () -> assertTrue(ListUtils.addIfNotPresent(list, 0, bar)),
      () -> assertFalse(ListUtils.addIfNotPresent(list, 0, bar)),
      () -> assertEquals(0, list.indexOf(bar)),
      () -> assertEquals(1, list.indexOf(foo)),
      () -> assertEquals(2, list.size())
  );
}