@Test
public void maxPreviewVersion() {

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