### Question:
ModifiableGenotypeDataInMemory extends AbstractRandomAccessGenotypeData implements ModifiableGenotypeData { @Override public GeneticVariant getSnpVariantByPos(String seqName, int startPos) { return getModifiableSnpVariantByPos(seqName, startPos); } ModifiableGenotypeDataInMemory(RandomAccessGenotypeData sourceGenotypeData); @Override List<String> getSeqNames(); @Override Iterable<Sequence> getSequences(); @Override Sequence getSequenceByName(String name); @Override Iterable<GeneticVariant> getVariantsByPos(String seqName, int startPos); @Override GeneticVariant getSnpVariantByPos(String seqName, int startPos); @Override Iterable<GeneticVariant> getSequenceGeneticVariants(String seqName); @Override List<Annotation> getVariantAnnotations(); @Override Annotation getVariantAnnotation(String annotationId); @Override List<Sample> getSamples(); @Override Iterator<GeneticVariant> iterator(); @Override synchronized GeneticVariantId getUpdatedId(ModifiableGeneticVariant geneticVariant); @Override synchronized Allele getUpdatedRef(ModifiableGeneticVariant geneticVariant); @Override synchronized SampleVariantsProvider getUpdatedSampleVariantProvider(ModifiableGeneticVariant geneticVariant); @Override synchronized void updateVariantId(ModifiableGeneticVariant geneticVariant,
            GeneticVariantId newGeneticVariantId); @Override synchronized void updateVariantPrimaryId(ModifiableGeneticVariant geneticVariant, String newPrimaryId); @Override synchronized void swapGeneticVariant(ModifiableGeneticVariant geneticVariant); @Override synchronized void updateRefAllele(ModifiableGeneticVariant geneticVariant, Allele newRefAllele); @Override synchronized Alleles getUpdatedAlleles(ModifiableGeneticVariant geneticVariant); @Override Iterable<ModifiableGeneticVariant> getModifiableSequenceGeneticVariants(String seqName); @Override Iterable<ModifiableGeneticVariant> getModifiableVariantsByPos(String seqName, int startPos); @Override ModifiableGeneticVariant getModifiableSnpVariantByPos(String seqName, int startPos); @Override Iterable<ModifiableGeneticVariant> getModifiableGeneticVariants(); @Override void excludeVariant(ModifiableGeneticVariant geneticVariant); @Override int getExcludedVariantCount(); @Override List<SampleAnnotation> getSampleAnnotations(); @Override Annotation getSampleAnnotation(String annotationId); @Override Iterable<GeneticVariant> getVariantsByRange(String seqName, int rangeStart, int rangeEnd); @Override void close(); @Override Map<String, Annotation> getVariantAnnotationsMap(); @Override Map<String, SampleAnnotation> getSampleAnnotationsMap(); @Override boolean isOnlyContaingSaveProbabilityGenotypes(); @Override boolean isSwapped(GeneticVariant geneticVariant);  }### Answer:
@Test public void getSnpVariantByPos() { GeneticVariant original = originalGenotypeData.getSnpVariantByPos("22", 14433624); GeneticVariant modifiable = modifiableGenotypeData.getSnpVariantByPos("22", 14433624); assertEquals(modifiable.getSequenceName(), original.getSequenceName()); assertEquals(modifiable.getStartPos(), original.getStartPos()); original = modifiableGenotypeData.getSnpVariantByPos("22", 1); assertNull(original); }