public DataPoint getLastDataPoint() {
        return dataPoints.get(dataPoints.size() - 1);
    }
@Test
    public void testGetLastDataPoint() {
        cm = new ChartModel(FOO, BAR);

        long time = System.currentTimeMillis();

        cm.addDataPoint(time)
                .data(FOO, VALUES1[0])
                .data(BAR, VALUES2[0]);

        cm.addDataPoint(time + 1)
                .data(FOO, VALUES1[1])
                .data(BAR, VALUES2[1]);

        assertEquals("Wrong result", VALUES1[1], cm.getLastDataPoint().get(FOO));
        assertEquals("Wrong result", VALUES2[1], cm.getLastDataPoint().get(BAR));
    }