def METHOD_NAME(dummy_agreement, state, expected):
    dummy_agreement.state = state
    assert dummy_agreement.rejected == expected
    assert Agreement.query.filter_by(rejected=expected).one() == dummy_agreement