@Override
  public void setLoadedCoreExtensions(Set<CoreExtension> coreExtensions) {
    checkState(this.coreExtensions == null, "Repository has already been initialized");

    this.coreExtensions = ImmutableSet.copyOf(coreExtensions);
    this.installedCoreExtensions = new HashSet<>(coreExtensions.size());
  }
@Test
  @UseDataProvider("coreExtensionsSets")
  public void setLoadedCoreExtensions_fails_with_ISE_if_called_twice(Set<CoreExtension> coreExtensions) {
    underTest.setLoadedCoreExtensions(coreExtensions);

    assertThatThrownBy(() -> underTest.setLoadedCoreExtensions(coreExtensions))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("Repository has already been initialized");
  }