def test_join_overlapping():
    f = annos.join_overlapping

    s, e = f([], [])
    assert len(s) == 0
    assert len(e) == 0

    s = [1, 3, 6]
    e = [2, 4, 10]
    expect = (s, e)
    result = f(s, e)
    assert result == expect

    x = np.array([[1, 2],
                  [3, 4], [4, 5],
                  [6, 8], [8, 8], [8, 9],
                  [10, 15], [10, 11], [11, 14], [14, 16]]
                 )
    expect = [[1, 2], [3, 5], [6, 9], [10, 16]]
    result = np.array(f(x[:, 0], x[:, 1])).T
    npt.assert_array_equal(result, expect)