public static SimpleIndexMainType parseMainType(String s) {
    List<String> split = SEPARATOR_SPLITTER.splitToList(s);
    checkArgument(split.size() >= 2, "Unsupported IndexType value: %s", s);

    return new SimpleIndexMainType(split.get(0), split.get(1));
  }
@Test
  public void parse_throws_IAE_if_invalid_format() {
    assertThatThrownBy(() -> IndexType.parseMainType("foo"))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("Unsupported IndexType value: foo");
  }