### Question:
SonarWayWithFindbugsProfile extends ProfileDefinition { @Override public RulesProfile createProfile(ValidationMessages validationMessages) { RulesProfile profile = sonarWay.createProfile(validationMessages); profile.setName(RulesProfile.SONAR_WAY_FINDBUGS_NAME); return profile; } SonarWayWithFindbugsProfile(SonarWayProfile sonarWay); @Override RulesProfile createProfile(ValidationMessages validationMessages);  }### Answer:
@Test public void shouldBeSameAsSonarWay() { RuleFinder ruleFinder = newRuleFinder(); SonarWayProfile sonarWay = new SonarWayProfile(new XMLProfileParser(ruleFinder)); RulesProfile withoutFindbugs = sonarWay.createProfile(ValidationMessages.create()); RulesProfile withFindbugs = new SonarWayWithFindbugsProfile(sonarWay).createProfile(ValidationMessages.create()); assertThat(withFindbugs.getActiveRules().size(), is(withoutFindbugs.getActiveRules().size())); assertThat(withFindbugs.getName(), is(RulesProfile.SONAR_WAY_FINDBUGS_NAME)); }