Description: Add utest
Fix lib

Issue: NA
Author: Arnaud Joubel <arnaud.joubel@gmail.com>
Review: NA
Test performed:make test
Test result: pass