add makeEndpoint method.

Add makeEndpoint method with it's unit test.
This method will deprecate createEndpoint.
instead of returning GenerateResponse like createEndpoint does,
makeEndpoint return Endpoint, so you can get endpointId.