### Question:
HttpResumableSession extends HttpSessionAbstract { public boolean tryWrite(final HttpResumableInfo resumableInfo, final InputStream stream) throws IOException { if (!session.isAuthenticated() || !session.isReady()) { logger.error("Not authenticated or not Ready"); return false; } if (!valid(resumableInfo)) { return false; } final HttpResumableChunkNumber chunkNumber = new HttpResumableChunkNumber(resumableInfo.getChunkNumber()); if (uploadedChunks.contains(chunkNumber)) { return false; } write(resumableInfo, stream); uploadedChunks.add(chunkNumber); session.getRunner().incrementRank(); return true; } HttpResumableSession(final HttpResumableInfo resumableInfo,
                       final String rulename, final String comment,
                       final HttpAuthent authent); HttpResumableInfo getHttpResumableInfo(); boolean tryWrite(final HttpResumableInfo resumableInfo,
                          final InputStream stream); boolean valid(final HttpResumableInfo resumableInfo); boolean contains(final HttpResumableInfo resumableInfo); boolean checkIfUploadFinished(final String sha256); @Override String toString();  }### Answer:
@Test public void testTryWrite() throws Exception { HttpResumableSession session = new HttpResumableSession(resumableInfo, "rule", "comment", authent); assertFalse(session.tryWrite(resumableInfo, null)); }