@Test(dataProvider = "excludeMatchingTests")
 public void testExcludeMatching(
     Set<String> values, Collection<String> filters, boolean exactMatch, Set<String> expected) {
   Set<String> actual =
       ListFileUtils.excludeMatching(
           values, ListFileUtils.IDENTITY_STRING_CONVERTER, filters, exactMatch);
   Assert.assertEquals(actual, expected);
 }
  @Test
  public void testUnpackSet() throws Exception {
    Set<String> expected = new HashSet<String>(Arrays.asList(publicTestDir + "exampleBAM.bam"));
    Set<String> actual;

    actual = ListFileUtils.unpackSet(Arrays.asList(publicTestDir + "exampleBAM.bam"));
    Assert.assertEquals(actual, expected);

    File tempListFile =
        createTempListFile(
            "testUnpackSet",
            "#",
            publicTestDir + "exampleBAM.bam",
            "#" + publicTestDir + "foo.bam",
            "      # " + publicTestDir + "bar.bam");
    actual = ListFileUtils.unpackSet(Arrays.asList(tempListFile.getAbsolutePath()));
    Assert.assertEquals(actual, expected);
  }
  private void performBAMListFileUnpackingTest(
      File tempListFile, List<SAMReaderID> expectedUnpackedFileList) throws Exception {
    List<String> bamFiles = new ArrayList<String>();
    bamFiles.add(tempListFile.getAbsolutePath());

    List<SAMReaderID> unpackedBAMFileList =
        ListFileUtils.unpackBAMFileList(bamFiles, new ParsingEngine(null));

    Assert.assertEquals(
        unpackedBAMFileList.size(),
        expectedUnpackedFileList.size(),
        "Unpacked BAM file list contains extraneous lines");
    Assert.assertEquals(
        unpackedBAMFileList,
        expectedUnpackedFileList,
        "Unpacked BAM file list does not contain correct BAM file names");
  }