@Test(expected = FormatException.class) public void testFormatExceptionIfOfferIsEmpty() throws Exception { expectReadRecord(createEmptyOffer()); SyncRecordReader reader = new SyncRecordReaderImpl(messageFactory, recordReader); reader.readOffer(); }
@Override public Offer readOffer() throws IOException { if (!hasOffer()) throw new FormatException(); return new Offer(readMessageIds()); }
SyncRecordReaderImpl implements SyncRecordReader { @Override public Offer readOffer() throws IOException { if (!hasOffer()) throw new FormatException(); return new Offer(readMessageIds()); } }
SyncRecordReaderImpl implements SyncRecordReader { @Override public Offer readOffer() throws IOException { if (!hasOffer()) throw new FormatException(); return new Offer(readMessageIds()); } SyncRecordReaderImpl(MessageFactory messageFactory, RecordReader reader); }
SyncRecordReaderImpl implements SyncRecordReader { @Override public Offer readOffer() throws IOException { if (!hasOffer()) throw new FormatException(); return new Offer(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 Offer readOffer() throws IOException { if (!hasOffer()) throw new FormatException(); return new Offer(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();  }