### Question:
GenomicBoundaries implements Iterable<GenomicBoundary<V>> { public final void addBoundary(String chromosome, Integer beginPoint, int endPoint){ chromosome = removeChr(chromosome); TreeMap<Integer, ArrayList<GenomicBoundary<V>>> chromosomeBoundaries; if(!genomicsBoundaries.containsKey(chromosome)){ chromosomeBoundaries = new TreeMap<Integer, ArrayList<GenomicBoundary<V>>>(); genomicsBoundaries.put(chromosome, chromosomeBoundaries); } else { chromosomeBoundaries = genomicsBoundaries.get(chromosome); } GenomicBoundary genomicBoundary; genomicBoundary = new GenomicBoundary(chromosome, beginPoint, endPoint); ArrayList<GenomicBoundary<V>> boundaries; if(chromosomeBoundaries.containsKey(beginPoint)){ boundaries = chromosomeBoundaries.get(beginPoint); } else { boundaries = new ArrayList<GenomicBoundary<V>>(); chromosomeBoundaries.put(beginPoint, boundaries); } boundaries.add(genomicBoundary); removedSubBoundaries = false; } GenomicBoundaries(String genomicsBoundarysFilePath);  GenomicBoundaries();  GenomicBoundaries(String genomicsBoundarysFilePath, int margin); final void addBoundary(String chromosome, Integer beginPoint, int endPoint); final void removeSubBoundaries(); final void mergeOverlappingBoundaries(); boolean isChromosomeInBoundary(String chromosome); Set<String> getChromosomes(); boolean isInBoundary(String chromosome, int position, int listIndex); GenomicBoundary getBoundary(String chromosome, int position, int listIndex); Iterator<GenomicBoundary<V>> iterator(); int getBoundaryCountChromosome(String chromosome); int getBoudaryCount(); void writeBoundariesToBedFile(String bedFilePath, String trackName); TreeMap<Integer, ArrayList<GenomicBoundary<V>>> getGenomicBoundariesMap(String chromosome); Collection<ArrayList<GenomicBoundary<V>>> getGenomicBoundaries(String chromosome); void mergeGenomicBoundaries(GenomicBoundaries otherGenomicBoundariesSet); HashMap<String, TreeMap<Integer, ArrayList<GenomicBoundary<V>>>> getGenomicBoundaries(); final void addBoundary(String chromosome, Integer beginPoint, int endPoint, V annotation);  }### Answer:
@Test public void testAddBoundary() { String chromosome = "1"; Integer beginPoint = 1; int endPoint = 3; GenomicBoundaries instance = new GenomicBoundaries(); instance.addBoundary(chromosome, beginPoint, endPoint); boolean expResult = true; boolean result = instance.isInBoundary(chromosome, beginPoint, 0); assertEquals(result, expResult); }
@Test public void testIteratorNew(){ String chromosome = "1"; Integer beginPoint = 1; int endPoint = 3; GenomicBoundaries<Object> instance = new GenomicBoundaries(); instance.addBoundary(chromosome, 1, 8); instance.addBoundary(chromosome, 1, 12); instance.addBoundary(chromosome, 1, 15); instance.addBoundary(chromosome, 1, 20); instance.addBoundary(chromosome, 2, 11); instance.addBoundary(chromosome, 3, 14); instance.addBoundary("2", 64, 128); GenomicBoundary boundary; }