def METHOD_NAME(self, action, state, errored):
    value = state.get(TESTKEY)
    if value:
        vs = ' // value is "%s"' % value
    else:
        vs = ' // value is not defined'
    if errored:
        print "    assertHasError();" + vs
    else:
        print "    assertHasNoError();" + vs