unittests and base class for controller