testapi controller and tests