Removed dependency on deprecated class ContaoController.
Added test case to check the code.