createCluster(clusterName);
Cluster c = clusters.getCluster(clusterName);
c.setDesiredStackVersion(currentStackId);
Assert.assertTrue(c.getCurrentStackVersion().equals(currentStackId));
ServerActionManager serverActionManager = new ServerActionManagerImpl(clusters);
Map<String, String> payload = new HashMap<String, String>();
payload.put(ServerAction.PayloadName.CLUSTER_NAME, clusterName);
payload.put(ServerAction.PayloadName.CURRENT_STACK_VERSION, newStackId.getStackId());
serverActionManager.executeAction(ServerAction.Command.FINALIZE_UPGRADE, payload);
Assert.assertTrue(c.getCurrentStackVersion().equals(newStackId));
}