@Test
public void define() {

    SonarRuntime sonarRuntime = SonarRuntimeImpl.forSonarQube(Version.create(7, 3), SonarQubeSide.SERVER);
    DartAnalyzerRulesDefinition rulesDefinition = new DartAnalyzerRulesDefinition(sonarRuntime);
    RulesDefinition.Context context = new RulesDefinition.Context();
    rulesDefinition.define(context);
    RulesDefinition.Repository dartAnalyzerRepository = context.repository("dartanalyzer");
    assertThat(dartAnalyzerRepository).isNotNull();
    assertThat(dartAnalyzerRepository.name()).isEqualTo("dartanalyzer");
    assertThat(dartAnalyzerRepository.language()).isEqualTo("dart");
    assertThat(dartAnalyzerRepository.rules()).isNotEmpty();
}