@Test
  public void testGetLocation() throws Exception {
    final ChartHelper chartHelper = new ChartHelper(getChart());

    assertNull(chartHelper.getLocation());
    chartHelper.generate(512, 384);
    assertNotNull(chartHelper.getLocation());
  }
 /**
  * Creates a panel for the demo.
  *
  * @return A panel.
  */
 public ChartPanel createDemoPanel() throws Exception {
   ChartPanel panel =
       new ChartPanel(
           ChartHelper.createChart(
               ChartHelper.createDataset(data, marker),
               data,
               marker,
               "Timeline Graph for " + prmtNo,
               true));
   return panel;
 }
  @Test
  public void testGetImageMap() throws Exception {
    final ChartHelper chartHelper = new ChartHelper(getChart());

    try {
      assertNull(chartHelper.getImageMap());
      fail("should have thrown NPE.");
    } catch (NullPointerException e) {
      // yay
    }
    chartHelper.generate(512, 384);
    assertNotNull(chartHelper.getImageMap());
    assertNotNull(chartHelper.getImageMapName());
  }