Storage { public LocalVcs.Memento load() { return load(STORAGE_FILE, new LocalVcs.Memento(), new Loader<LocalVcs.Memento>() { public LocalVcs.Memento load(Stream s) throws IOException { LocalVcs.Memento m = new LocalVcs.Memento(); m.myRoot = s.readEntry(); m.myEntryCounter = s.readInteger(); m.myChangeList = s.readChangeList(); return m; } }); } Storage(File dir); LocalVcs.Memento load(); void saveState(final LocalVcs.Memento m); void saveContents(); void close(); Content storeContent(byte[] bytes); void purgeContents(List<Content> contents);  }
@Test public void testCleanStorage() { m = s.load(); assertTrue(m.myRoot.getChildren().isEmpty()); assertEquals(0, m.myEntryCounter); assertTrue(m.myChangeList.getChanges().isEmpty()); }