createBranch and corresponding tests