:type line: str
    :type key: str
    :type value: str
    :type context: behave.runner.Context

def then_then_returned_element_have_a_key(context, line, key, value):
    """
    :type line: str
    :type key: str
    :type value: str
    :type context: behave.runner.Context
    """
    line = int(line)
    data = context.apiRequest.data
    assert 0 <= line < len(data)
    row = data[line]
    assert key in row
    assert row[key] == value