adapt conroller for test