Booter { static String resolveLocalRepoPath(String localRepoPath) { String home = System.getenv("ZEPPELIN_HOME"); if (home == null) { home = System.getProperty("zeppelin.home"); } if (home == null) { home = ".."; } return Paths.get(home).resolve(localRepoPath).toAbsolutePath().toString(); }  static RepositorySystem newRepositorySystem(); static RepositorySystemSession newRepositorySystemSession(
      RepositorySystem system, String localRepoPath); static RemoteRepository newCentralRepository(); static RemoteRepository newLocalRepository();  }
@Test public void should_return_absolute_path() { String resolvedPath = Booter.resolveLocalRepoPath("path"); assertTrue(Paths.get(resolvedPath).isAbsolute()); }
@Test public void should_not_change_absolute_path() { String absolutePath = Paths.get("first", "second").toAbsolutePath().toString(); String resolvedPath = Booter.resolveLocalRepoPath(absolutePath); assertThat(resolvedPath, equalTo(absolutePath)); }
@Test(expected = NullPointerException.class) public void should_throw_exception_for_null() { Booter.resolveLocalRepoPath(null); }