int nbBranches = Randomizer.randomBetween(30, 50);
List<TreeBranchState> branches = new ArrayList<TreeBranchState>(nbBranches);
for (int i = 0; i < nbBranches; i++) {
branches.add(createRandomTreeBranchState());
}
ConditionalTaskState photosynthesis = UtilDataCreatorForTests.createRandomConditionalTaskState();
ConditionalTaskState aging = UtilDataCreatorForTests.createRandomConditionalTaskState();
ConditionalTaskState growth = UtilDataCreatorForTests.createRandomConditionalTaskState();
TreeTrunkState trunkState = createRandomTreeTrunkState();
float height = (float) Math.random();
Tree3DState tree3dState = DisplayDataCreatorForTests.createRandomTree3DState();
return new TreeState(age, energy, branches, photosynthesis, aging, growth, trunkState, height, tree3dState);
}