int nbParts = Randomizer.randomBetween(2, 4);
List<TreeBranchPartState> branchPartStates = new ArrayList<TreeBranchPartState>(nbParts);
for (int i = 0; i < nbParts; i++) {
branchPartStates.add(createRandomTreeBranchPartState());
}
TreeBranch3DState branch3DState = DisplayDataCreatorForTests.createRandomTreeBranch3DState();
return new TreeBranchState(age, energy, freeEnergy, branchPartStates, branch3DState);
}