move test case into test/lib