Adding support for dispatch and dispatch test