testcases that simulates the problem