@Test
public void testReadDataReturnDataAfterFormat() {

  long presentationTimeUs = 1000000;
  EventMessage eventMessage = newEventMessageWithId(1);
  EventStream eventStream = new EventStream(SCHEME_ID, VALUE, TIME_SCALE,
      new long[] {presentationTimeUs}, new EventMessage[] {eventMessage});
  EventSampleStream sampleStream = new EventSampleStream(eventStream, FORMAT, false);
  // first read - read format
  readData(sampleStream);
  int result = readData(sampleStream);
  assertThat(result).isEqualTo(C.RESULT_BUFFER_READ);
  assertThat(inputBuffer.data.array())
      .isEqualTo(getEncodedMessage(eventMessage));
}