move lib tests to lib