JavaPropertiesProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages messages) { AnnotationBasedProfileBuilder annotationBasedProfileBuilder = new AnnotationBasedProfileBuilder(ruleFinder); return annotationBasedProfileBuilder.build( GenericJavaPropertiesRulesDefinition.GENERIC_REPOSITORY_KEY, SONARQUBE_WAY_PROFILE_NAME, JavaPropertiesLanguage.KEY, GenericJavaPropertiesRulesDefinition.getChecks(), messages); } JavaPropertiesProfile(RuleFinder ruleFinder); @Override RulesProfile createProfile(ValidationMessages messages);  }
@Test public void should_create_sonarqube_way_profile() { ValidationMessages validation = ValidationMessages.create(); JavaPropertiesProfile definition = new JavaPropertiesProfile(universalRuleFinder()); RulesProfile profile = definition.createProfile(validation); assertThat(profile.getName()).isEqualTo("SonarQube Way"); assertThat(profile.getLanguage()).isEqualTo("jproperties"); assertThat(profile.getActiveRulesByRepository("jproperties")).hasSize(22); assertThat(validation.hasErrors()).isFalse(); }