@@ -0,0 +1,1587 @@
+package quadTree;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.Comparator;%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0A%0Apublic class QuadTreeTest %7B%0A%09private static final String DATASET = %22dataset.dat%22;%0A%09private static final String EXPECTED_DATASET = %22expected_dataset.dat%22;%0A%0A%09private Comparator%3C? super DataPoint%3E resultComparator = new Comparator%3CDataPoint%3E() %7B%0A%09%09@Override%0A%09%09public int compare(DataPoint o1, DataPoint o2) %7B%0A%09%09%09float r1 = (float)Math.sqrt(o1.x * o1.x + o1.y * o1.y);%0A%09%09%09float r2 = (float)Math.sqrt(o2.x * o2.x + o2.y * o2.y);%0A%0A%09%09%09return Float.compare(r1, r2);%0A%09%09%7D%0A%09%7D;%0A%0A%09@Test%0A%09public void testIntersect() throws Exception %7B%0A%09%09List%3CDataPoint%3E dataset = DataSet.readDataPoints(DATASET);%0A%09%09Rectangle rect = new Rectangle(-0.1f, -0.1f, 0.1f, 0.1f);%0A%0A%09%09List%3CDataPoint%3E expectedResult = DataSet.readDataPoints(EXPECTED_DATASET);%0A%09%09List%3CDataPoint%3E actualResult = getIntersectedSetUsingQuadTree(dataset, rect);%0A%0A%09%09Collections.sort(actualResult, resultComparator);%0A%0A%09%09assertTrue(identical(actualResult, expectedResult));%0A%09%7D%0A%0A%09private List%3CDataPoint%3E getIntersectedSetUsingQuadTree(List%3CDataPoint%3E dataset, Rectangle rect) %7B%0A%09%09throw new UnsupportedOperationException(%22Not Yet Implemented%22);%0A%09%7D%0A%0A%09private boolean identical(List%3CDataPoint%3E testSet1, List%3CDataPoint%3E testSet2) %7B%0A%09%09if(testSet1.size() != testSet2.size()) %7B%0A            return false;%0A        %7D%0A%0A%09%09for (int i = 0; i %3C testSet1.size(); i++) %7B%0A%09%09%09if (!testSet1.get(i).equals(testSet2.get(i))) %7B%0A%09%09%09%09return false;%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09return true;%0A%09%7D%0A%7D%0A

Create QuadTreeTest.java