ChangedList implements Serializable { public synchronized void clear() { fileList.clear(); reservedFiles.clear(); fireChangedEvent(); } private  ChangedList(); static synchronized ChangedList getInstance(); void setFileExclusionManager(FileExclusionManager fileExclusionManager); boolean addChangedFile(final File changedFile); int getListSize(); int getListSizeIncludingReservedFiles(); void addListener(ChangedListListener listener); void removeListener(ChangedListListener listener); synchronized void clear(); synchronized ChangedFile reserve(); long getVersion(); long persist(File persistFile); synchronized void restore(File persistFile, List<File> contentDirs); synchronized List<File> peek(int maxFiles); void shutdown();  }
@Test public void testClear() throws Exception { int fileCount = 5; List<File> files = new ArrayList<File>(fileCount); for (int i = 0; i < fileCount; i++) { File f = new File("changedListTest-" + i + ".tmp"); files.add(f); changedList.addChangedFile(f); } Assert.assertEquals(fileCount, changedList.getListSize()); changedList.clear(); Assert.assertEquals(0, changedList.getListSize()); }