Add tests for nested dispatch.