def METHOD_NAME():
    '''Test that the create method in the WhileLoop class raises the expected
    exception if the provided input is invalid.'''
    loop_condition = Literal('true', BOOLEAN_TYPE)
    loop_body = [Assignment.create(
        Reference(DataSymbol("tmp", REAL_SINGLE_TYPE)),
        Literal("0.0", REAL_SINGLE_TYPE))]
    # Loop condition not a Node.
    with pytest.raises(GenerationError) as excinfo:
        _ = WhileLoop.create("True", loop_body)
    assert ("Item 'str' can't be child 0 of 'WhileLoop'. The valid format is: "
            "'DataNode, Schedule'.") in str(excinfo.value)
    # Loop body not a Node.
    loop_body_err = [Assignment.create(
                                Reference(DataSymbol("tmp", REAL_SINGLE_TYPE)),
                                Literal("0.0", REAL_SINGLE_TYPE)), "invalid"]
    with pytest.raises(GenerationError) as excinfo:
        _ = WhileLoop.create(loop_condition, loop_body_err)
    assert ("Item 'str' can't be child 1 of 'Schedule'. The valid format is: "
            "'[Statement]*'.") in str(excinfo.value)
    # While loop body not a list.
    with pytest.raises(GenerationError) as excinfo:
        _ = WhileLoop.create(loop_condition, "invalid")
    assert ("loop_body argument in create method of WhileLoop class should be "
            "a list but found 'str'.") in str(excinfo.value)