@Test
public void testAdd_failsOnNullArgument() throws Exception {

    try {
        seriesRegistry.add(null, null);
        fail("IllegalArgumentException expected.");
    } catch(IllegalArgumentException e) {
        // expected
    }
    try {
        seriesRegistry.add(new SimpleXYSeries("s1"), null);
        fail("IllegalArgumentException expected.");
    } catch(IllegalArgumentException e) {
        // expected
    }
    try {
        seriesRegistry.add(null, new LineAndPointFormatter());
        fail("IllegalArgumentException expected.");
    } catch(IllegalArgumentException e) {
        // expected
    }
}