public RulesDefinition.Context load() {
    RulesDefinition.Context context = new RulesDefinitionContext();
    for (RulesDefinition pluginDefinition : pluginDefs) {
      context.setCurrentPluginKey(serverPluginRepository.getPluginKey(pluginDefinition));
      pluginDefinition.define(context);
    }
    context.setCurrentPluginKey(null);
    return context;
  }
@Test
  public void load_definitions() {
    RulesDefinition.Context context = new RuleDefinitionsLoader(mock(ServerPluginRepository.class),
      new RulesDefinition[] {
        new FindbugsDefinitions(), new JavaDefinitions()
      }).load();

    assertThat(context.repositories()).hasSize(2);
    assertThat(context.repository("findbugs")).isNotNull();
    assertThat(context.repository("java")).isNotNull();
  }