CreateMojo mojo = new CreateMojo();
String urlScm = "scm:git:file://" + repositoryLocationToUse;
mojo.setUrlScm(urlScm);
mojo.setScmDirectory(new File(repositoryLocationToUse));
ScmManager scmManager = new DefaultScmManager();
scmManager.setScmProvider("git", new GitExeScmProvider());
mojo.setScmManager(scmManager);
try {
String scmBranch = mojo.getScmBranch();
assertEquals(branchExpectedToFind, scmBranch);