WeightedObservedPoints implements Serializable { public void add(double x, double y) { add(1d, x, y); }  void add(double x, double y); void add(double weight, double x, double y); void add(WeightedObservedPoint observed); List<WeightedObservedPoint> toList(); void clear();  }
@Test public void testAdd1() { final WeightedObservedPoints store = new WeightedObservedPoints(); final double x = 1.2; final double y = 34.56; final double w = 0.789; store.add(w, x, y); Assert.assertTrue(lastElementIsSame(store, new WeightedObservedPoint(w, x, y))); }
@Test public void testAdd2() { final WeightedObservedPoints store = new WeightedObservedPoints(); final double x = 1.2; final double y = 34.56; final double w = 0.789; store.add(new WeightedObservedPoint(w, x, y)); Assert.assertTrue(lastElementIsSame(store, new WeightedObservedPoint(w, x, y))); }
@Test public void testAdd3() { final WeightedObservedPoints store = new WeightedObservedPoints(); final double x = 1.2; final double y = 34.56; store.add(x, y); Assert.assertTrue(lastElementIsSame(store, new WeightedObservedPoint(1, x, y))); }