Backport AuthorizeTest from 2.1

Signed-off-by: crynobone <crynobone@gmail.com>
Refactor Orchestra\Control\Authorize.

Signed-off-by: crynobone <crynobone@gmail.com>
Merge branch '2.0' into 2.1