fix api controller tests