Bug 916917 - uninitialized constant ApplicationState

* Wrong module used to address constant.
* Missing test coverage added
Merge pull request #1504 from jwhonce/wip/master

Merged by openshift-bot