Merge "Updated the test to cover the test case with flags enabled" into main