public void replaceItem(final @NotNull ComponentItem itemToBeReplaced, final @NotNull ComponentItem replacement) {
    LOG.assertTrue(myItems.contains(itemToBeReplaced));

    final int index = myItems.indexOf(itemToBeReplaced);
    myItems.set(index, replacement);
  }
public void replaceItem(final @NotNull ComponentItem itemToBeReplaced, final @NotNull ComponentItem replacement)