public void testAddTwice() {
   DummyConfigurationItem item = new DummyConfigurationItem(_applied);
   _config.addConfigurationItem(item);
   _config.addConfigurationItem(item);
   _config.applyConfigurationItems(new MockServer());
   Assert.areEqual(1, item.prepareCount());
   assertListsAreEqual(Arrays.asList(item), _applied);
 }
 public void testPrepareApply() {
   List<DummyConfigurationItem> items =
       Arrays.asList(new DummyConfigurationItem(_applied), new DummyConfigurationItem(_applied));
   for (DummyConfigurationItem item : items) {
     _config.addConfigurationItem(item);
     Assert.areEqual(1, item.prepareCount());
   }
   Assert.areEqual(0, _applied.size());
   _config.applyConfigurationItems(new MockServer());
   assertListsAreEqual(items, _applied);
   for (DummyConfigurationItem item : items) {
     Assert.areEqual(1, item.prepareCount());
   }
 }