@Test
public void testCreateSonarWayProfile() {

    ValidationMessages validation = ValidationMessages.create();
    RuleFinder ruleFinder = buildRuleFinder();
    ApexProfile definition = new ApexProfile(ruleFinder);
    RulesProfile profile = definition.createProfile(validation);
    assertThat(profile.getLanguage(), equalTo(Apex.KEY));
    assertThat(profile.getName(), equalTo(CheckList.SONAR_WAY_PROFILE));
    assertThat(validation.hasErrors(), is(FALSE));
}