public void testClearProperties() throws Exception {
   ILaunchConfigurationWorkingCopy wc = createWorkingCopy();
   BootLaunchConfigurationDelegate.setProperties(
       wc, Arrays.asList(pv("some", "thing", true), pv("some.other", "thing", false)));
   assertFalse(BootLaunchConfigurationDelegate.getProperties(wc).isEmpty());
   BootLaunchConfigurationDelegate.clearProperties(wc);
   assertTrue(BootLaunchConfigurationDelegate.getProperties(wc).isEmpty());
 }
  public void testGetSetProperties() throws Exception {
    ILaunchConfigurationWorkingCopy wc = createWorkingCopy();
    assertProperties(
        BootLaunchConfigurationDelegate.getProperties(wc)
        /*empty*/
        );

    BootLaunchConfigurationDelegate.setProperties(wc, null); // accepts null in lieu of empty list,
    assertProperties(
        BootLaunchConfigurationDelegate.getProperties(wc)
        /*empty*/
        );

    // store one single property
    doGetAndSetProps(wc, pv("foo", "Hello", true));

    // store empty property list
    doGetAndSetProps(
        wc
        /*empty*/
        );

    // store a few properties
    doGetAndSetProps(
        wc,
        pv("foo.bar", "snuffer.nazz", true),
        pv("neala", "nolo", false),
        pv("Hohoh", "Santa Claus", false));

    // store properties with identical keys
    doGetAndSetProps(
        wc,
        pv("foo", "snuffer.nazz", true),
        pv("foo", "nolo", false),
        pv("bar", "Santa Claus", false),
        pv("bar", "Santkkk ", false));
  }
 private void doGetAndSetProps(ILaunchConfigurationWorkingCopy wc, PropVal... props) {
   BootLaunchConfigurationDelegate.setProperties(wc, Arrays.asList(props));
   List<PropVal> retrieved = BootLaunchConfigurationDelegate.getProperties(wc);
   assertProperties(retrieved, props);
 }