Unit test of controller