Improve dispatch tests
Improve dispatch tests

Test base on return value is not good enough.

Signed-off-by: Jerry Yu <c6cd1413a9492a82cc7fe506fb3a273f7dc9927d@arm.com>

ARMmbed/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls,ARMmbed/mbedtls,NXPmicro/mbedtls,Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,NXPmicro/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,NXPmicro/mbedtls,NXPmicro/mbedtls