ChunksManifest extends ChunksManifestBean { public KnownLengthInputStream getBody() { String xml = ManifestDocumentBinding.createDocumentFrom(this); log.debug("Manifest body: '" + xml + "'"); try { return new KnownLengthInputStream(xml); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } ChunksManifest(ChunksManifestBean bean);  ChunksManifest(String sourceContentId,
                          String sourceMimetype,
                          long sourceByteSize); void setMD5OfSourceContent(String md5); String getManifestId(); String nextChunkId(); void addEntry(String chunkId, String chunkMD5, long chunkSize); KnownLengthInputStream getBody(); String getMimetype(); static final String SCHEMA_VERSION; final static String chunkSuffix; final static String manifestSuffix; }
@Test public void testGetBody() { String chunkId; for (int i = 0; i < NUM_ENTRIES; ++i) { chunkId = chunkIdPrefix + getChunkIndex(i); manifest.addEntry(chunkId, chunkMD5Prefix + i, i); } InputStream body = manifest.getBody(); Assert.assertNotNull(body); verifyManifestXml(body); }