void () { CategoryLineChart<Double> chart = LineChart.of(1.0, 2.0, 3.0, 4.0, 5.0); CategoryLineDataset<Double> negativeValues = LineDataset.of(-1.0, -2.0, -3.0, -4.0, -5.0); chart.getDatasets().add(negativeValues); MinMax<Integer, Double> xy = chart.findMinMax(); Assert.assertEquals(2, chart.getDatasets().size()); Assert.assertTrue(chart.getComponent() instanceof JComponent); Assert.assertEquals(Integer.valueOf(0), xy.xMin); Assert.assertEquals(Integer.valueOf(4), xy.xMax); Assert.assertEquals(Double.valueOf(-5.0), xy.yMin); Assert.assertEquals(Double.valueOf(5.0), xy.yMax); }