Move unit test to separate lib.