add unit test for controller with timeout