def METHOD_NAME(mosviz_helper, mos_image, spectrum1d, mos_spectrum2d):
    spectra1d = [spectrum1d] * 2
    spectra2d = [mos_spectrum2d] * 2
    mosviz_helper.load_data(spectra1d, spectra2d, images=mos_image)
    table = mosviz_helper.app.get_viewer('table-viewer')
    # first row is automatically selected in the UI
    # (otherwise it would be None which is a case not handled)
    table.widget_table.highlighted = 0
    table.next_row()
    assert table.widget_table.highlighted == 1
    table.next_row()
    # with only 2 rows, this should wrap back to 0
    assert table.widget_table.highlighted == 0
    table.prev_row()
    assert table.widget_table.highlighted == 1