JSONObject masterDetails = getRemoteBranch(gitRemoteUri, 1, 0, Constants.MASTER);
String masterLocation = masterDetails.getString(ProtocolConstants.KEY_LOCATION);
fetch(masterLocation);
JSONObject merge = merge(gitHeadUri, Constants.DEFAULT_REMOTE_NAME + "/" + Constants.MASTER, true);
MergeStatus mergeResult = MergeStatus.valueOf(merge.getString(GitConstants.KEY_RESULT));
assertEquals(MergeStatus.FAILED, mergeResult);
JSONObject failingPaths = merge.getJSONObject(GitConstants.KEY_FAILING_PATHS);
assertEquals(1, failingPaths.length());
assertEquals(MergeFailureReason.DIRTY_WORKTREE, MergeFailureReason.valueOf(failingPaths.getString("test.txt")));
}