Fix bug where waitsFor has an optional failureMessage

It should be defined as optional for failureMessage according to the specifications.