### Question:
MD5DigestCalculatingInputStream extends SdkFilterInputStream { @Override public boolean markSupported() { return super.markSupported() && digestCanBeCloned; } MD5DigestCalculatingInputStream(InputStream in); @Override boolean markSupported(); byte[] getMd5Digest(); @Override void mark(int readlimit); @Override void reset(); @Override int read(); @Override int read(byte[] b, int off, int len);  }### Answer:
@Test public void testMD5CloneSupportedTrue() throws Exception { InputStream in = mock(InputStream.class); doReturn(true).when(in).markSupported();; MD5DigestCalculatingInputStream md5Digest = new MD5DigestCalculatingInputStream(in); assertTrue(md5Digest.markSupported()); }
@Test public void testMD5CloneSupportedFalse() throws Exception { InputStream in = mock(InputStream.class); doReturn(false).when(in).markSupported();; MD5DigestCalculatingInputStream md5Digest = new MD5DigestCalculatingInputStream(in); assertFalse(md5Digest.markSupported()); }