@Test
public void latestVersion() {

  SdkUpdaterConfigurable configurable = Mockito.mock(SdkUpdaterConfigurable.class);
  FakePackage.FakeRemotePackage v1 = new FakePackage.FakeRemotePackage("foo;1");
  v1.setRevision(new Revision(1));
  FakePackage.FakeRemotePackage v11 = new FakePackage.FakeRemotePackage("foo;1.1");
  v11.setRevision(new Revision(1, 1));
  FakePackage.FakeRemotePackage latest = new FakePackage.FakeRemotePackage("foo;latest");
  latest.setRevision(new Revision(1, 1));
  List<DetailsTreeNode> nodes = ImmutableList.of(
    new DetailsTreeNode(new PackageNodeModel(new UpdatablePackage(v1)), null, configurable),
    new DetailsTreeNode(new PackageNodeModel(new UpdatablePackage(latest)), null, configurable),
    new DetailsTreeNode(new PackageNodeModel(new UpdatablePackage(v11)), 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());
}