void () { XYLineChart<Integer, Double> chart = LineChart.of(new XYLineDataset<>()); ChartUtils.generator(45).prepare(-360, 360).forEach(value -> { chart.getDataset().add(Coordinates.of(value, Math.sin(Math.toRadians(value)))); }); MinMax<Integer, Double> xy = chart.findMinMax(); Assert.assertEquals(Integer.valueOf(-360), xy.xMin); Assert.assertEquals(Integer.valueOf(360), xy.xMax); Iterator<Coordinates<Integer, Double>> iterator = chart.getDataset().getData().iterator(); for (int i = -360; i <= 360; i += 45) { Coordinates<Integer, Double> next = iterator.next(); Assert.assertEquals(Integer.valueOf(i), next.getX()); Assert.assertEquals(Double.valueOf(Math.sin(Math.toRadians(i))), next.getY()); } Assert.assertFalse(iterator.hasNext()); }