add rest.NewEndpoint() test