@Test public void testAcceptShouldReturnFalseWhenFileNameDoesNotMatchWithRegExp() { String example = "20130701132107.0025red.txt"; given(file.isFile()).willReturn(true); given(file.getName()).willReturn(example); boolean result = underTest.accept(file); assertFalse(result); }
@Override public boolean accept(final File file) { return file.isFile() && isMatchWithRegExp(file); }
MessageFileFilter implements FileFilter { @Override public boolean accept(final File file) { return file.isFile() && isMatchWithRegExp(file); } }
MessageFileFilter implements FileFilter { @Override public boolean accept(final File file) { return file.isFile() && isMatchWithRegExp(file); }  }
MessageFileFilter implements FileFilter { @Override public boolean accept(final File file) { return file.isFile() && isMatchWithRegExp(file); }  @Override boolean accept(final File file); }
MessageFileFilter implements FileFilter { @Override public boolean accept(final File file) { return file.isFile() && isMatchWithRegExp(file); }  @Override boolean accept(final File file);  }