VcfFiles { public static VCFHeader readVcfHeader(Path vcfPath) { Objects.requireNonNull(vcfPath, "Cannot read from null vcfPath"); logger.debug("Reading VCF header from file {}", vcfPath); try (VCFFileReader vcfReader = new VCFFileReader(vcfPath, false)) { return vcfReader.getFileHeader(); } } private  VcfFiles(); static Stream<VariantContext> readVariantContexts(Path vcfPath); static VCFHeader readVcfHeader(Path vcfPath);  }
@Test public void testReadVcfHeader() { Path vcfPath = Paths.get("src/test/resources/altAllele.vcf"); VCFHeader header = VcfFiles.readVcfHeader(vcfPath); assertThat(header.getGenotypeSamples(), equalTo(ImmutableList.of("sample"))); }