fixed testcase for valid endpoint check