@Test public void readResponse_withPartlyConsumingCallbackReturningNull_shouldThrow() throws Exception { ImapResponseParser parser = createParser("* {4}\r\ntest\r\n"); TestImapResponseCallback callback = TestImapResponseCallback.readBytesAndReturn(2, null); try { parser.readResponse(callback); fail(); } catch (AssertionError e) { assertEquals("Callback consumed some data but returned no result", e.getMessage()); } }
public ImapResponse readResponse() throws IOException { return readResponse(null); }
ImapResponseParser { public ImapResponse readResponse() throws IOException { return readResponse(null); } }
ImapResponseParser { public ImapResponse readResponse() throws IOException { return readResponse(null); } ImapResponseParser(PeekableInputStream in); }
ImapResponseParser { public ImapResponse readResponse() throws IOException { return readResponse(null); } ImapResponseParser(PeekableInputStream in); ImapResponse readResponse(); ImapResponse readResponse(ImapResponseCallback callback); }
ImapResponseParser { public ImapResponse readResponse() throws IOException { return readResponse(null); } ImapResponseParser(PeekableInputStream in); ImapResponse readResponse(); ImapResponse readResponse(ImapResponseCallback callback);  }