### Question:
VcfManager { public List<VariantContext> query(Region region) throws Exception { return query(region, null, new VariantOptions(), VariantContext.class); } VcfManager(Path input); Path createIndex(); Path createIndex(Path indexPath); List<VariantContext> query(Region region); List<VariantContext> query(Region region, VariantOptions options); List<VariantContext> query(Region region, VariantFilters<VariantContext> filters, VariantOptions options); List<VariantContext> query(VariantFilters<VariantContext> filters); List<VariantContext> query(VariantFilters<VariantContext> filters, VariantOptions options); List<T> query(VariantFilters<VariantContext> filters, VariantOptions options, Class<T> clazz); List<T> query(Region region, VariantFilters<VariantContext> filters, VariantOptions options, Class<T> clazz); VcfIterator<VariantContext> iterator(); VcfIterator<VariantContext> iterator(VariantFilters<VariantContext> filters); VcfIterator<T> iterator(VariantFilters<VariantContext> filters, Class<T> clazz); VcfIterator<VariantContext> iterator(Region region); VcfIterator<VariantContext> iterator(Region region, VariantFilters<VariantContext> filters); VcfIterator<T> iterator(Region region, VariantFilters<VariantContext> filters, Class<T> clazz); void close();  }### Answer:
@Test public void regionQuery() throws Exception { Path path = Paths.get(getClass().getResource(filename).toURI()); VcfManager vcfManager = new VcfManager(path); index(vcfManager); Region region = new Region("2", 2000000, 3000000); List<VariantContext> list = vcfManager.query(region); for (VariantContext vc: list) { System.out.println(vc); } assertEquals(2, list.size()); }
@Test public void regionQueryAvro() throws Exception { Path path = Paths.get(getClass().getResource(filename).toURI()); VcfManager vcfManager = new VcfManager(path); index(vcfManager); Region region = new Region("2", 2000000, 3000000); List<Variant> list = vcfManager.query(region, null, null, Variant.class); for (Variant v: list) { System.out.println(v); } assertEquals(2, list.size()); }
@Test public void regionQueryProto() throws Exception { Path path = Paths.get(getClass().getResource(filename).toURI()); VcfManager vcfManager = new VcfManager(path); index(vcfManager); Region region = new Region("2", 2000000, 3000000); List<VariantProto.Variant> list = vcfManager.query(region, null, null, VariantProto.Variant.class); for (VariantProto.Variant v: list) { System.out.println(v); } assertEquals(2, list.size()); }