[backend] dispatcher refactoring/unittests