@Override
  protected List<MatchResult> match(List<String> specs) throws IOException {
    return match(new File(".").getAbsolutePath(), specs);
  }
@Test
  public void testMatchInDirectory() throws Exception {
    List<String> expected = ImmutableList.of(temporaryFolder.newFile("a").toString());
    temporaryFolder.newFile("aa");
    temporaryFolder.newFile("ab");

    String expectedFile = expected.get(0);
    int slashIndex = expectedFile.lastIndexOf('/');
    if (SystemUtils.IS_OS_WINDOWS) {
      slashIndex = expectedFile.lastIndexOf('\\');
    }
    String directory = expectedFile.substring(0, slashIndex);
    String relative = expectedFile.substring(slashIndex + 1);
    // This no longer works:
    //     System.setProperty("user.dir", directory);
    // There is no way to set the working directory without forking. Instead we
    // call in to the helper method that gives just about as good test coverage.
    List<MatchResult> results = localFileSystem.match(directory, ImmutableList.of(relative));
    assertThat(
        toFilenames(results), containsInAnyOrder(expected.toArray(new String[expected.size()])));
  }