* add unit test * fix #907 * format code * format code * format code Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>