@Test
public void testDetailsTreeNodeListener() throws Exception {

  UpdatablePackage updatablePackage = new UpdatablePackage(new FakePackage.FakeLocalPackage("foo"));
  ChangeListener listener = Mockito.mock(ChangeListener.class);
  DetailsTreeNode node = new DetailsTreeNode(new PackageNodeModel(updatablePackage), listener, myConfigurable);
  node.setState(NOT_INSTALLED);
  ArgumentCaptor<ChangeEvent> argument = ArgumentCaptor.forClass(ChangeEvent.class);
  Mockito.verify(listener).stateChanged(argument.capture());
  assertEquals(node, argument.getValue().getSource());
}