@Test
  public void testAddServiceIcmp() throws Exception {

    m_provisioner.addServiceICMP("MyIcmp", 77, 1066, 36, 5, 1812);
    checkServiceConfiguration("MyIcmp", "MyIcmp", 77, 1066, 36, 5, 1812);

    TestPollerConfigManager mgr =
        new TestPollerConfigManager(m_pollerConfig.getXml(), "localhost", false);

    Package pkg = mgr.getPackage("MyIcmp");
    assertNotNull(pkg);
    assertNotNull(mgr.getServiceInPackage("MyIcmp", pkg));
  }
  private Map<String, Object> checkServiceConfiguration(
      String pkgName,
      String svcName,
      int retries,
      int timeout,
      int interval,
      int downtimeInterval,
      int downtimeDuration)
      throws Exception {
    Map<String, Object> configParams = m_provisioner.getServiceConfiguration(pkgName, svcName);
    assertEquals(svcName, configParams.get("serviceid"));
    assertEquals(Integer.valueOf(interval), configParams.get("interval"));
    assertEquals(Integer.valueOf(downtimeInterval), configParams.get("downtime_interval"));
    assertEquals(Integer.valueOf(downtimeDuration), configParams.get("downtime_duration"));
    assertNull(configParams.get("downtime_interval1"));
    assertNull(configParams.get("downtime_duration1"));
    assertEquals(Integer.valueOf(retries), configParams.get("retries"));
    assertEquals(Integer.valueOf(timeout), configParams.get("timeout"));

    TestPollerConfigManager mgr =
        new TestPollerConfigManager(m_pollerConfig.getXml(), "localhost", false);

    Package pkg = mgr.getPackage(pkgName);
    assertNotNull(pkg);
    Service svc = mgr.getServiceInPackage(svcName, pkg);
    assertNotNull(svc);
    assertEquals(interval, svc.getInterval());
    assertNotNull(
        "Unables to find monitor for svc " + svcName + " in origonal config",
        m_pollerConfig.getServiceMonitor(svcName));
    assertNotNull("Unable to find monitor for svc " + svcName, mgr.getServiceMonitor(svcName));

    assertNotNull(
        "Unable to find protocol plugin in capsdConfig for svc " + svcName,
        m_capsdConfig.getProtocolPlugin(svcName));
    assertNotNull(
        "Unable to find service table entry in capsdConfig for svc " + svcName,
        m_syncer.getServiceId(svcName));

    return configParams;
  }