Added tests for hex() function

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>