With test cases