refactor unit test

Signed-off-by: rootfs <hchen@redhat.com>