WorkspacePathResolver { public Path getPagesRepositoryPath() { return getRepositoryPath(PAGES_DEFAULT_DIRECTORY, env.getProperty("repository.pages")); }  Path getWorkspacePath(); Path getTemporaryWorkspacePath(); Path getPagesRepositoryPath(); Path getWidgetsRepositoryPath(); Path getTmpPagesRepositoryPath();  }
@Test public void should_resolve_pages_repository_path() throws Exception { when(env.getProperty("user.home")).thenReturn(System.getProperty("user.home")); assertThat(workspacePathResolver.getPagesRepositoryPath()) .isEqualTo(Paths.get(System.getProperty("user.home") + "/.bonita/pages")); }
@Test public void should_retrieve_pages_repository_path_from_environment_variable() throws Exception { when(env.getProperty("repository.pages")).thenReturn("path/to/pages"); assertThat(workspacePathResolver.getPagesRepositoryPath()).isEqualTo(Paths.get("path/to/pages")); }