add unittest for Typedef.toHash