fix failing functional test

simplify command object initialization code by moving it into
ControllersApi