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