### Question:
ScalaProfileDefinition implements BuiltInQualityProfilesDefinition { @Override public void define(BuiltInQualityProfilesDefinition.Context context) { NewBuiltInQualityProfile profile = context.createBuiltInQualityProfile(ScalaPlugin.PROFILE_NAME, ScalaPlugin.SCALA_LANGUAGE_KEY); BuiltInQualityProfileJsonLoader.load(profile, ScalaPlugin.SCALA_REPOSITORY_KEY, PATH_TO_JSON); profile.done(); }  @Override void define(BuiltInQualityProfilesDefinition.Context context);  }### Answer:
@Test public void profile() { BuiltInQualityProfilesDefinition.Context context = new BuiltInQualityProfilesDefinition.Context(); new ScalaProfileDefinition().define(context); BuiltInQualityProfilesDefinition.BuiltInQualityProfile profile = context.profile("scala", "Sonar way"); assertThat(profile.rules()).extracting("repoKey").containsOnly("scala"); assertThat(profile.rules().size()).isGreaterThanOrEqualTo(1); assertThat(profile.rules()).extracting(BuiltInActiveRule::ruleKey).contains("ParsingError"); }