func TestServiceWithoutLogger(t *testing.T) {
	s := res.NewService("test")
	s.SetLogger(nil)
	s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() }))
	session := restest.NewSession(t, s, restest.WithKeepLogger)
	defer session.Close()
}
Test that service can be served without logger
package test
import (
	"encoding/json"
	"testing"
	"time"
	res "github.com/jirenius/go-res"
	"github.com/jirenius/go-res/logger"
	"github.com/jirenius/go-res/restest"
)
func TestService(t *testing.T) {
	s := res.NewService("foo")
	s.Handle("bar.$id",
		res.Access(res.AccessGranted),
		res.GetModel(func(r res.ModelRequest) {
			r.Model(struct {
				Message string `json:"msg"`
			}{r.PathParam("id")})
		}),
	)
	c := restest.NewSession(t, s)
	defer c.Close()
	c.Get("foo.bar.42").
		Response().
		AssertModel(map[string]string{"msg": "42"})
}
func TestServiceProtocolVersion(t *testing.T) {
	s := res.NewService("test")
	restest.AssertEqualJSON(t, "ProtocolVersion()", s.ProtocolVersion(), "1.2.2")
}
func TestServiceStart(t *testing.T) {
	runTest(t, func(s *res.Service) {
		s.Handle("model", res.GetResource(func(r res.GetRequest) { r.NotFound() }))
	}, nil)
}