write tests for test_case