FileStitcherDriver { public void stitch(String spaceId, String manifestId, File toDir) throws Exception { verifyDir(toDir); Content content = stitcher.getContentFromManifest(spaceId, manifestId); writeContentToDir(content, toDir); } FileStitcherDriver(DataSource dataSource); void stitch(String spaceId, String manifestId, File toDir); static void main(String[] args);  }
@Test public void testStitch() throws Exception { createStitchMocks(); replayMocks(); driver.stitch(spaceId, manifestId, toDir); File result = new File(toDir, contentId); Assert.assertTrue("stitched file must exist", result.exists()); Assert.assertTrue("stitched file must have size", result.length() > 0); }