Fixed logic for EndpointFormatFor
Removed MockCmdlt