refine controller unit tests