def test_optional_mul(a, b):
    unit = (a + b)
    optional = (epsilon(a.alphabet) | unit)
    assert optional.accepts([])
    assert (not optional.accepts(['a']))
    assert (not optional.accepts(['b']))
    assert optional.accepts(['a', 'b'])
    assert (not optional.accepts(['a', 'a']))
    optional = (optional * 2)
    assert optional.accepts([])
    assert (not optional.accepts(['a']))
    assert (not optional.accepts(['b']))
    assert (not optional.accepts(['a', 'a']))
    assert optional.accepts(['a', 'b'])
    assert (not optional.accepts(['b', 'a']))
    assert (not optional.accepts(['b', 'b']))
    assert (not optional.accepts(['a', 'a', 'a']))
    assert optional.accepts(['a', 'b', 'a', 'b'])
def test_optional_mul(a, b):
    unit = (a + b)
    optional = (epsilon(a.alphabet) | unit)
    assert optional.accepts([])
    assert (not optional.accepts(['a']))
    assert (not optional.accepts(['b']))
    assert optional.accepts(['a', 'b'])
    assert (not optional.accepts(['a', 'a']))
    optional = (optional * 2)
    assert optional.accepts([])
    assert (not optional.accepts(['a']))
    assert (not optional.accepts(['b']))
    assert (not optional.accepts(['a', 'a']))
    assert optional.accepts(['a', 'b'])
    assert (not optional.accepts(['b', 'a']))
    assert (not optional.accepts(['b', 'b']))
    assert (not optional.accepts(['a', 'a', 'a']))
    assert optional.accepts(['a', 'b', 'a', 'b'])