@Test
public void returnsEmptyIfNoEvent() throws Exception {

  SortedSet<SequenceEvent> events = newTreeSet(SequenceEvent.COUNTER_COMPARATOR);
  when(storage.readEvents(WORKFLOW_INSTANCE)).thenReturn(events);
  Optional<RunStateData> restoredRunStateData = ReplayEvents.getBackfillRunStateData(
      WORKFLOW_INSTANCE,
      storage, "bf-1");
  assertThat(restoredRunStateData, is(Optional.empty()));
}