@Override
  public Stream<FileSlice> getLatestFileSlicesIncludingInflight(String partitionPath) {
    return execute(partitionPath, preferredView::getLatestFileSlicesIncludingInflight, (path) -> getSecondaryView().getLatestFileSlicesIncludingInflight(path));
  }
@Test
  public void testGetLatestFileSlicesIncludingInflight() {
    Stream<FileSlice> actual;
    Stream<FileSlice> expected = testFileSliceStream;
    String partitionPath = "/table2";

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

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

    resetMocks();
    when(secondary.getLatestFileSlicesIncludingInflight(partitionPath)).thenReturn(testFileSliceStream);
    actual = fsView.getLatestFileSlicesIncludingInflight(partitionPath);
    assertEquals(expected, actual);

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