@Test
public void should_refresh_repository() throws Exception {

    Page page = addToRepository(aPage());
    pagesPath.resolve(".metadata").resolve(page.getId() + ".json").toFile().delete();
    pagesPath.resolve(".metadata").resolve(".index.json").toFile().delete();
    repository.refresh(page.getId());
    Page fetchedPage = repository.get(page.getId());
    assertThat(fetchedPage.isFavorite()).isFalse();
    assertThat(pagesPath.resolve(".metadata").resolve(".index.json").toFile()).exists();
}