@Override
  public HoodieTimeline getTimeline() {
    return execute(preferredView::getTimeline, () -> getSecondaryView().getTimeline());
  }
@Test
  public void testGetTimeline() {
    HoodieTimeline actual;
    HoodieTimeline expected = new MockHoodieTimeline(Stream.empty(), Stream.empty());

    when(primary.getTimeline()).thenReturn(expected);
    actual = fsView.getTimeline();
    assertEquals(expected, actual);
    verify(secondaryViewSupplier, never()).get();

    resetMocks();
    when(secondaryViewSupplier.get()).thenReturn(secondary);
    when(primary.getTimeline()).thenThrow(new RuntimeException());
    when(secondary.getTimeline()).thenReturn(expected);
    actual = fsView.getTimeline();
    assertEquals(expected, actual);

    resetMocks();
    when(secondary.getTimeline()).thenReturn(expected);
    actual = fsView.getTimeline();
    assertEquals(expected, actual);

    resetMocks();
    when(secondary.getTimeline()).thenThrow(new RuntimeException());
    assertThrows(RuntimeException.class, () -> {
      fsView.getTimeline();
    });
  }