Add api controller with test cases.