GitWorkflowRepository extends FileBasedWorkflowRepository implements WorkflowRepository, FileBasedWorkflowRepositoryMXBean { @Override public synchronized void start() { logger.info("Starting git workflow repository."); if (gitObserverStopped != null) throw new IllegalStateException("Git workflow repository can only be startet once."); try { updateLocalGitRepositories(); } catch (Exception e) { throw new GitWorkflowRepositoryException("Exception while initial update of it workflow repository.", e); } this.gitObserverStopped = new AtomicBoolean(false); observerThread = new GitWorkflowRepository.ObserverThread(this); observerThread.start(); super.start(); }  synchronized void setGitRepositoryDir(File gitRepositoryDir); synchronized void setGitRepositoryDir(String gitRepositoryDir); synchronized File getGitRepositoryDir(); synchronized String getOriginUri(); synchronized String getBranch(); synchronized void setOriginURI(String originUri); synchronized void setCredentials(String username, char[] password); synchronized void setBranch(String branch); @Override synchronized void setCheckIntervalMSec(int checkIntervalMSec); @Override synchronized void start(); @Override synchronized void shutdown(); synchronized boolean isUp(); static final String ORIGIN; static final String DEFAULT_BRANCH; }
@Test(expected = GitWorkflowRepository.GitWorkflowRepositoryException.class) public void startFailureEmptyRepoTest() throws Exception { GitWorkflowRepository wfRepo2 = new GitWorkflowRepository(); wfRepo2.start(); }