Add unit tests for /lib