Storage { public Content storeContent(byte[] bytes) { if (isBroken) return new UnavailableContent(); try { int id = myContentStorage.store(bytes); return new StoredContent(this, id); } catch (BrokenStorageException e) { markAsBroken(e); return new UnavailableContent(); } } 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 testCreatingContent() { Content c = s.storeContent(b("abc")); assertArrayEquals(b("abc"), c.getBytes()); }