@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
  public void setLoadedCoreExtensions_fails_with_NPE_if_argument_is_null() {
    assertThatThrownBy(() ->  underTest.setLoadedCoreExtensions(null))
      .isInstanceOf(NullPointerException.class);
  }