### Question:
B2PartOfContentSource implements B2ContentSource { @Override public InputStream createInputStream() throws IOException, B2Exception { return new B2InputStreamExcerpt(source.createInputStream(), start, length); } B2PartOfContentSource(B2ContentSource source,
                          long start,
                          long length); @Override long getContentLength(); @Override String getSha1OrNull(); @Override Long getSrcLastModifiedMillisOrNull(); @Override InputStream createInputStream(); @Override String toString();  }### Answer:
@Test public void testCreateInputStream() throws IOException, B2Exception { final InputStream underlyingStream = new ByteArrayInputStream(new byte[0]); when(source.createInputStream()).thenReturn(underlyingStream); final InputStream wrappedStream = partOf.createInputStream(); assertTrue(wrappedStream instanceof B2InputStreamExcerpt); final B2InputStreamExcerpt excerpt = (B2InputStreamExcerpt) wrappedStream; assertEquals(26, excerpt.getExcerptStart()); assertEquals(100, excerpt.getExcerptLength()); }