@Test(expected = FormatException.class) public void testFormatExceptionIfRequestIsEmpty() throws Exception { expectReadRecord(createEmptyRequest()); SyncRecordReader reader = new SyncRecordReaderImpl(messageFactory, recordReader); reader.readRequest(); }
@Override public Request readRequest() throws IOException { if (!hasRequest()) throw new FormatException(); return new Request(readMessageIds()); }
SyncRecordReaderImpl implements SyncRecordReader { @Override public Request readRequest() throws IOException { if (!hasRequest()) throw new FormatException(); return new Request(readMessageIds()); } }
SyncRecordReaderImpl implements SyncRecordReader { @Override public Request readRequest() throws IOException { if (!hasRequest()) throw new FormatException(); return new Request(readMessageIds()); } SyncRecordReaderImpl(MessageFactory messageFactory, RecordReader reader); }
SyncRecordReaderImpl implements SyncRecordReader { @Override public Request readRequest() throws IOException { if (!hasRequest()) throw new FormatException(); return new Request(readMessageIds()); } SyncRecordReaderImpl(MessageFactory messageFactory, RecordReader reader); @Override boolean eof(); @Override boolean hasAck(); @Override Ack readAck(); @Override boolean hasMessage(); @Override Message readMessage(); @Override boolean hasOffer(); @Override Offer readOffer(); @Override boolean hasRequest(); @Override Request readRequest(); }
SyncRecordReaderImpl implements SyncRecordReader { @Override public Request readRequest() throws IOException { if (!hasRequest()) throw new FormatException(); return new Request(readMessageIds()); } SyncRecordReaderImpl(MessageFactory messageFactory, RecordReader reader); @Override boolean eof(); @Override boolean hasAck(); @Override Ack readAck(); @Override boolean hasMessage(); @Override Message readMessage(); @Override boolean hasOffer(); @Override Offer readOffer(); @Override boolean hasRequest(); @Override Request readRequest();  }