### Question:
HapsGenotypeData extends AbstractRandomAccessGenotypeData implements SampleVariantsProvider { @Override public List<Sample> getSamples() { return Collections.unmodifiableList(samples); } HapsGenotypeData(String path);  HapsGenotypeData(File hapsFile, File sampleFile);  HapsGenotypeData(File hapsFile, File sampleFile, int cacheSize);  HapsGenotypeData(File hapsFile, File sampleFile, String forceSeqName);  HapsGenotypeData(File hapsFile, File sampleFile, int cacheSize, String forceSeqName); @Override Iterable<Sequence> getSequences(); @Override List<Sample> getSamples(); @Override Map<String, Annotation> getVariantAnnotationsMap(); @Override Map<String, SampleAnnotation> getSampleAnnotationsMap(); @Override synchronized List<Alleles> getSampleVariants(GeneticVariant variant); @Override synchronized List<Boolean> getSamplePhasing(GeneticVariant variant); @Override boolean arePhasedProbabilitiesPresent(GeneticVariant variant); @Override int cacheSize(); @Override int getSampleVariantProviderUniqueId(); @Override byte[] getSampleCalledDosage(GeneticVariant variant); @Override float[] getSampleDosage(GeneticVariant variant); @Override void close(); @Override Iterator<GeneticVariant> iterator(); @Override List<String> getSeqNames(); @Override Iterable<GeneticVariant> getVariantsByPos(String seqName, int startPos); @Override Iterable<GeneticVariant> getSequenceGeneticVariants(String seqName); @Override Iterable<GeneticVariant> getVariantsByRange(String seqName, int rangeStart, int rangeEnd); @Override boolean isOnlyContaingSaveProbabilityGenotypes(); @Override float[][] getSampleProbilities(GeneticVariant variant); @Override double[][] getSampleProbabilitiesComplex(GeneticVariant variant); @Override double[][][] getSampleProbabilitiesPhased(GeneticVariant variant); @Override FixedSizeIterable<GenotypeRecord> getSampleGenotypeRecords(GeneticVariant variant);  }### Answer:
@Test public void getSamples() { List<Sample> samples = genotypeData.getSamples(); assertEquals(samples.size(), 4); Sample sample = samples.get(0); assertEquals(sample.getId(), "1"); assertEquals(sample.getFamilyId(), "1"); Map<String, ?> annotations = sample.getAnnotationValues(); assertEquals(annotations.size(), 7); assertEquals((Float) annotations.get(GenotypeData.SAMPLE_MISSING_RATE_FLOAT), 0.25f, 0.0001); assertEquals(annotations.get("cov_1"), "1"); assertEquals(annotations.get("cov_2"), "2"); assertEquals((Float) annotations.get("cov_3"), 0.0019f, 0.00001); assertTrue(Float.isNaN((Float) annotations.get("cov_4"))); assertEquals((Float) annotations.get("pheno1"), 1.233f, 0.0001); assertEquals(annotations.get("bin1"), true); }