### Question:
GitKeepFileIndexer extends AbstractFileIndexer { @Override public boolean supportsPath(final Path path) { return Objects.equals(path.getFileName().toString(), KEEP_FILE); }  @Override boolean supportsPath(final Path path);  }### Answer:
@Test public void testSupportsPathFail() { final org.uberfire.java.nio.file.Path path = mock(org.uberfire.java.nio.file.Path.class); final org.uberfire.java.nio.file.Path fileName = mock(org.uberfire.java.nio.file.Path.class); doReturn(fileName).when(path).getFileName(); doReturn("fail.txt").when(fileName).toString(); assertFalse(indexer.supportsPath(path)); }
@Test public void testSupportsPathSuccess() { final org.uberfire.java.nio.file.Path path = mock(org.uberfire.java.nio.file.Path.class); final org.uberfire.java.nio.file.Path fileName = mock(org.uberfire.java.nio.file.Path.class); doReturn(fileName).when(path).getFileName(); doReturn(".gitkeep").when(fileName).toString(); assertTrue(indexer.supportsPath(path)); }