test case logic