@Test public void shouldDetectEmptyFiles() { SourceFile file = (SourceFile) squid.search("org/foo/CommentedOutFile.java"); assertThat(file.getCheckMessages().size(), is(1)); CheckMessage message = file.getCheckMessages().iterator().next(); assertThat(message.getLine(), nullValue()); assertThat(message.getDefaultMessage(), is("This Java file is empty")); }