public class JobTest {
@Test
public void testGetBranchWithRemote() {
List<Remote> remotes = Arrays.asList(new Remote("origin", "git@github.com"));
Git git = new Git(null, new Head(null, null, null, null, null, null), "master", remotes);
Job job = new Job().withBranch("origin/master").withGit(git);
assertEquals("master", job.getBranch());
}