XYZ interview question

Write test case