final List<RefSpec> refspecs = Collections.singletonList(new RefSpec(
"refs/heads/*:refs/remotes/origin/*"));
final String remoteBranch = getRemoteBranchPrefix() + Constants.DEFAULT_REMOTE_NAME + "/"
+ Constants.MASTER;
final String bothBranches = Constants.MASTER + "," + remoteBranch;
<BUG>w.git.fetch_().from(remote, refspecs).execute();
w.git.checkout().ref(Constants.MASTER).execute();
</BUG>
assertEquals(Constants.MASTER,
formatBranches(w.git.getBranchesContaining(c1.name(), false)));

final List<RefSpec> refspecs = Collections.singletonList(new RefSpec(
"refs/heads/*:refs/remotes/origin/*"));
final String remoteBranch = getRemoteBranchPrefix() + Constants.DEFAULT_REMOTE_NAME + "/"
+ Constants.MASTER;
final String bothBranches = Constants.MASTER + "," + remoteBranch;
w.git.fetch_().from(remote, refspecs).execute();
checkoutTimeout = 1 + random.nextInt(60 * 60 * 24);
w.git.checkout().ref(Constants.MASTER).timeout(checkoutTimeout).execute();
assertEquals(Constants.MASTER,
formatBranches(w.git.getBranchesContaining(c1.name(), false)));
