Move test cases into test.rs