@Test
public void nonRuleSourceFileWillBeIgnoredWhenBuildingListOfRuleSources() throws IOException {

    File markDownFile = mock(File.class, new MethodNotMockedAnswer());
    File ruleDirectory = mock(File.class, new MethodNotMockedAnswer());
    doReturn(true).when(markDownFile).isFile();
    doReturn(false).when(markDownFile).isDirectory();
    doReturn("readme.md").when(markDownFile).getName();
    doReturn(new File[] {markDownFile}).when(ruleDirectory).listFiles();
    doReturn(true).when(ruleDirectory).isDirectory();
    doReturn(false).when(ruleDirectory).isFile();
    List<RuleSource> sources = FileRuleSource.getRuleSources(ruleDirectory);
    assertThat(sources.size(), equalTo(1));
}