### Question:
VcfGenotypeData extends AbstractRandomAccessGenotypeData implements SampleVariantsProvider { @Override public GeneticVariant getSnpVariantByPos(String seqName, int startPos) { Iterable<GeneticVariant> variants = getVariantsByPos(seqName, startPos); GeneticVariant snp = null; for (GeneticVariant variant : variants) { if (snp == null && variant.isSnp()) { snp = variant; } } return snp; } VcfGenotypeData(File bzipVcfFile, int cacheSize, double minimumPosteriorProbabilityToCall);  VcfGenotypeData(File bzipVcfFile, File tabixIndexFile, double minimumPosteriorProbabilityToCall);  VcfGenotypeData(File bzipVcfFile, File tabixIndexFile, int cacheSize, double minimumPosteriorProbabilityToCall); @Override Iterator<GeneticVariant> iterator(); @Override List<Alleles> getSampleVariants(final GeneticVariant variant); @Override Map<String, Annotation> getVariantAnnotationsMap(); @Override List<Sequence> getSequences(); @Override List<Sample> getSamples(); @Override int cacheSize(); @Override List<Boolean> getSamplePhasing(GeneticVariant variant); @Override boolean arePhasedProbabilitiesPresent(GeneticVariant variant); @Override int getSampleVariantProviderUniqueId(); @Override Map<String, SampleAnnotation> getSampleAnnotationsMap(); @Override byte[] getSampleCalledDosage(GeneticVariant variant); @Override float[] getSampleDosage(GeneticVariant variant); @Override void close(); @Override boolean isOnlyContaingSaveProbabilityGenotypes(); @Override float[][] getSampleProbilities(GeneticVariant variant); @Override double[][] getSampleProbabilitiesComplex(GeneticVariant variant); @Override double[][][] getSampleProbabilitiesPhased(GeneticVariant variant); @Override FixedSizeIterable<GenotypeRecord> getSampleGenotypeRecords(GeneticVariant variant); @Override List<String> getSeqNames(); @Override Iterable<GeneticVariant> getSequenceGeneticVariants(String seqName); @Override Iterable<GeneticVariant> getVariantsByPos(final String seqName, final int startPos); @Override GeneticVariant getSnpVariantByPos(String seqName, int startPos); @Override Iterable<GeneticVariant> getVariantsByRange(final String seqName, final int rangeStart, final int rangeEnd); MappedGenotypeField getPreferredGenotypeField(); void setPreferredGenotypeField(String preferredGenotypeField);  }### Answer:
@Test public void testSnpVariants() { GeneticVariant snpGeneticVariant = genotypeData.getSnpVariantByPos("1", 3172273); assertNotNull(snpGeneticVariant); assertEquals(snpGeneticVariant.isSnp(), true); }