@Override
  public Plugin getPluginInstance(String key) {
    checkState(started.get(), NOT_STARTED_YET);
    Plugin plugin = pluginInstancesByKeys.get(key);
    checkArgument(plugin != null, "Plugin [%s] does not exist", key);
    return plugin;
  }
@Test
  public void getPluginInstance_throws_ISE_if_repo_is_not_started() {
    assertThatThrownBy(() -> underTest.getPluginInstance("foo"))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("not started yet");
  }