DuraStoreChunkSyncEndpoint extends DuraStoreSyncEndpoint { @Override public Iterator<String> getFilesList() { return new ChunkFilteredIterator(super.getFilesList()); } DuraStoreChunkSyncEndpoint(ContentStore contentStore,
                                      String username,
                                      String spaceId,
                                      boolean syncDeletes,
                                      boolean jumpStart,
                                      long maxFileSize);  DuraStoreChunkSyncEndpoint(ContentStore contentStore,
                                      String username,
                                      String spaceId,
                                      boolean syncDeletes,
                                      long maxFileSize,
                                      boolean syncUpdates,
                                      boolean renameUpdates,
                                      boolean jumpStart,
                                      String updateSuffix,
                                      String prefix); @Override void deleteContent(String spaceId, String contentId); @Override Iterator<String> getFilesList();  }
@Test public void testGetFilesList() throws Exception { List<String> contents = new ArrayList<String>(); contents.add("item-0"); contents.add("item-1"); contents.add("item-2"); contents.add("chunk" + chunkSuffix + 0); contents.add("chunk" + chunkSuffix + 1); contents.add("manifest" + manifestSuffix); createGetFilesListMocks(contents); replayMocks(); setEndpoint(); Iterator<String> filesList = endpoint.getFilesList(); Assert.assertNotNull(filesList); Assert.assertEquals(contents.get(0), filesList.next()); Assert.assertEquals(contents.get(1), filesList.next()); Assert.assertEquals(contents.get(2), filesList.next()); Assert.assertEquals(contents.get(5), filesList.next() + manifestSuffix); Assert.assertNull(filesList.next()); }