### Question:
GenomicBoundaries implements Iterable<GenomicBoundary<V>> { public final void removeSubBoundaries(){ GenomicBoundary previousGenomicBoundary = null; GenomicBoundary genomicBoundary; Iterator<GenomicBoundary<V>> gboit = this.iterator(); while(gboit.hasNext()){ genomicBoundary = gboit.next(); if(genomicBoundary.isPartOfBoundary(previousGenomicBoundary)){ gboit.remove(); } previousGenomicBoundary = genomicBoundary; } removedSubBoundaries = true; } 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 testRemoveSubBoundaries() { GenomicBoundaries instance = new GenomicBoundaries(); instance.addBoundary("1", 2, 3); instance.addBoundary("1", 1, 4); instance.removeSubBoundaries(); boolean expResult = true; boolean result = instance.isInBoundary("1", 1, 0); assertEquals(result, expResult); expResult = true; result = instance.isInBoundary("1", 2, 0); assertEquals(result, expResult); expResult = true; result = instance.isInBoundary("1", 3, 0); assertEquals(result, expResult); expResult = false; result = instance.isInBoundary("1", 5, 0); assertEquals(result, expResult); int expBoundaryCount = 1; int boundaryCount = instance.getBoundaryCountChromosome("1"); assertEquals(expBoundaryCount, boundaryCount); }