public static <K, E> Collector<E, ImmutableListMultimap.Builder<K, E>, ImmutableListMultimap<K, E>> index(Function<? super E, K> keyFunction) {
    return index(keyFunction, Function.identity());
  }
@Test
  public void index_fails_if_key_function_is_null() {
    assertThatThrownBy(() -> index(null))
      .isInstanceOf(NullPointerException.class)
      .hasMessage("Key function can't be null");
  }