// validate branch metadata
JSONObject branch = branchesArray.getJSONObject(0);
assertEquals(Constants.MASTER, branch.getString(ProtocolConstants.KEY_NAME));
assertBranchUri(branch.getString(ProtocolConstants.KEY_LOCATION));
assertTrue(branch.optBoolean(GitConstants.KEY_BRANCH_CURRENT, false));
branch = branchesArray.getJSONObject(1);
assertEquals("z", branch.getString(ProtocolConstants.KEY_NAME));
// assert properly sorted, current branch is first, then other branches sorted by timestamp
long lastTime = Long.MAX_VALUE;
for (int i = 1; i < branchesArray.length(); i++) {