Add tree walk tests

Signed-off-by: Dima Kuznetsov <dkuznets@redhat.com>