@Override
  public BuiltIndex<NewAuthorizedIndex> build() {
    checkState(!getRelations().isEmpty(), "At least one relation mapping must be defined");
    return new BuiltIndex<>(this);
  }
@Test
  public void build_fails_if_no_relation_mapping_has_been_created() {
    NewAuthorizedIndex underTest = new NewAuthorizedIndex(someIndex, defaultSettingsConfiguration);

    assertThatThrownBy(() -> underTest.build())
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("At least one relation mapping must be defined");
  }