added unittest for sign+encrypt