Git git = null;
InitContext ctx = new InitContext();
ctx.setMaster("own").setDevelop("you");
git = RepoUtil.createRepositoryWithMaster(newDir());
JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();
File gitDir = git.getRepository().getDirectory();
File gitConfig = new File(gitDir, "config");
assertTrue(gitConfig.exists());
//try to re-init
JGitFlowInitCommand initCommand2 = new JGitFlowInitCommand();
//this should NOT throw
JGitFlow flow2 = initCommand2.setDirectory(git.getRepository().getWorkTree()).setForce(true).setInitContext(ctx).call();
String configText = new String(IO.readFully(gitConfig));
assertTrue(configText.contains("[gitflow \"branch\"]"));
assertTrue(configText.contains("[gitflow \"prefix\"]"));