### Question:
PageCompareDataImpl implements PageCompareData { @Override public List<VersionSelection> getVersions() { return versionSelection; } PageCompareDataImpl(Resource resource, String versionName); @Override Resource getResource(); @Override String getVersion(); @Override Date getVersionDate(); @Override String getPath(); @Override List<VersionSelection> getVersions(); @Override List<PageCompareDataLine> getLines();  }### Answer:
@Test public void shouldInitialize() throws RepositoryException { final String path = "/my/path"; final String versionName = "latest"; final Resource resource = mockResource(path, versionName, new Date()); final PageCompareData pageCompareData = new PageCompareDataImpl(resource, versionName); assertThat(pageCompareData.getVersions(), not(Collections.<VersionSelection>emptyList())); }
@Test public void getVersions() throws RepositoryException { final Resource resource = mockResource("/my/path", "latest", new Date()); final PageCompareData pageCompareData = new PageCompareDataImpl(resource, "latest"); final List<VersionSelection> versions = pageCompareData.getVersions(); assertThat(versions, not(Collections.<VersionSelection>emptyList())); assertThat(versions.get(1).getName(), is("latest")); }