def METHOD_NAME(dynkern):
    ''' Tests for the KernCallInvokeArgList.generate() method. '''
    # generate() assumes a suitably initialised symbol table so create
    # that here.
    table = LFRicSymbolTable()
    table.new_symbol("field_type", symbol_type=DataTypeSymbol,
                     datatype=DeferredType())
    kcial = KernCallInvokeArgList(dynkern, table)
    kcial.generate()
    assert len(kcial.fields) == 5
    assert len(kcial.scalars) == 3
    # Check that we can call it repeatedly.
    kcial.generate()
    assert len(kcial.fields) == 5
    # Check that an unsupported scalar type gives the expected error.
    dynkern.arguments.args[0]._intrinsic_type = 'wrong'
    kcial = KernCallInvokeArgList(dynkern, table)
    with pytest.raises(NotImplementedError) as err:
        kcial.generate()
    assert "Scalar of type 'wrong' not supported" in str(err.value)