### Question:
SonarWayProfile extends ProfileDefinition { public RulesProfile createProfile(ValidationMessages messages) { return xmlProfileParser.parseResource(getClass().getClassLoader(), "org/sonar/plugins/ideainspections/profile-sonar-way.xml", messages); } SonarWayProfile(XMLProfileParser xmlProfileParser); RulesProfile createProfile(ValidationMessages messages);  }### Answer:
@Test public void shouldCreateProfile() { ProfileDefinition sonarWay = new SonarWayProfile(new XMLProfileParser(newRuleFinder())); ValidationMessages validation = ValidationMessages.create(); RulesProfile profile = sonarWay.createProfile(validation); assertThat(profile.getActiveRulesByRepository(IdeaConstants.REPOSITORY_KEY).size(), greaterThan(1)); assertThat(validation.hasErrors(), is(false)); }