void () { Integer[] xs = {-1, 0, 1}; Double[] ys = {-100.0, 0.0, 100.0}; XYLineDataset<Integer, Double> dataset = LineDataset.of(xs, ys); Iterable<Coordinates<Integer, Double>> data = dataset.getData(); Iterator<Coordinates<Integer, Double>> iterator = data.iterator(); Assert.assertTrue(data instanceof ArrayList); Assert.assertEquals(Coordinates.of(-1, -100.0), iterator.next()); Assert.assertEquals(Coordinates.of(0, 0.0), iterator.next()); Assert.assertEquals(Coordinates.of(1, 100.0), iterator.next()); Assert.assertFalse(iterator.hasNext()); }