@Test
public void maxVersion() {

  SdkUpdaterConfigurable configurable = Mockito.mock(SdkUpdaterConfigurable.class);
  List<DetailsTreeNode> nodes = ImmutableList.of(
    new DetailsTreeNode(new PackageNodeModel(new UpdatablePackage(new FakePackage.FakeRemotePackage("foo;1.0.0-alpha1"))), null, configurable),
    new DetailsTreeNode(new PackageNodeModel(new UpdatablePackage(new FakePackage.FakeRemotePackage("foo;1.0.0-beta2"))), null, configurable),
    new DetailsTreeNode(new PackageNodeModel(new UpdatablePackage(new FakePackage.FakeRemotePackage("foo;1.0.0"))), null, configurable),
    new DetailsTreeNode(new PackageNodeModel(new UpdatablePackage(new FakePackage.FakeRemotePackage("foo;0.9.9"))), null, configurable)
  );
  MultiVersionTreeNode node = new MultiVersionTreeNode(nodes);
  node.cycleState();
  assertEquals(PackageNodeModel.SelectedState.NOT_INSTALLED, nodes.get(0).getCurrentState());
  assertEquals(PackageNodeModel.SelectedState.NOT_INSTALLED, nodes.get(1).getCurrentState());
  assertEquals(PackageNodeModel.SelectedState.INSTALLED, nodes.get(2).getCurrentState());
  assertEquals(PackageNodeModel.SelectedState.NOT_INSTALLED, nodes.get(3).getCurrentState());
}