public void load() {
    Set<CoreExtension> coreExtensions = serviceLoaderWrapper.load(getClass().getClassLoader());
    ensureNoDuplicateName(coreExtensions);

    coreExtensionRepository.setLoadedCoreExtensions(coreExtensions);
    if (!coreExtensions.isEmpty()) {
      LOG.info("Loaded core extensions: {}", coreExtensions.stream().map(CoreExtension::getName).collect(Collectors.joining(", ")));
    }
  }
@Test
  public void load_has_no_effect_if_there_is_no_ServiceLoader_for_CoreExtension_class() {
    when(serviceLoaderWrapper.load(any())).thenReturn(Collections.emptySet());

    underTest.load();

    verify(serviceLoaderWrapper).load(CoreExtensionsLoader.class.getClassLoader());
    verify(coreExtensionRepository).setLoadedCoreExtensions(Collections.emptySet());
    verifyNoMoreInteractions(serviceLoaderWrapper, coreExtensionRepository);
  }