Bug 995291 -[CostControl] Add unit test

If you are not going to modify the behaviour, please use a spy.