* @throws Exception
*/
static BestPossibleStateOutput calcBestPossState(ClusterDataCache cache) throws Exception
{
ClusterEvent event = new ClusterEvent("sampleEvent");
event.addAttribute("ClusterDataCache", cache);
ResourceComputationStage rcState = new ResourceComputationStage();
CurrentStateComputationStage csStage = new CurrentStateComputationStage();
BestPossibleStateCalcStage bpStage = new BestPossibleStateCalcStage();
runStage(event, rcState);
runStage(event, csStage);
runStage(event, bpStage);
BestPossibleStateOutput output =
event.getAttribute(AttributeName.BEST_POSSIBLE_STATE.toString());
// System.out.println("output:" + output);
return output;
}