enhance NewEndpoint test