CATS-523 Refactor DispatchAllocationController and write test
After merge commit