func (t *Tester) Update(model Model, update bson.M) Model {
	found, err := t.Store.M(model).Update(nil, model, model.ID(), update, false)
	if err != nil {
		panic(err)
	} else if !found {
		panic("not found")
	}
	base := model.GetBase()
	*base = B(model.ID())
	return model
}
Update will update the specified model.
package coal
import (
	"github.com/256dpi/xo"
	"go.mongodb.org/mongo-driver/bson"
)
type Tester struct {
	Store *Store
	Models []Model
}
func NewTester(store *Store, models ...Model) *Tester {
	if store == nil {
		store = MustOpen(nil, "test", xo.Panic)
	}
	tester := &Tester{
		Store:  store,
		Models: models,
	}
	for _, model := range models {
		_, _ = store.C(model).InsertOne(nil, GetMeta(model).Make())
	}
	tester.Clean()
	return tester
}
func (t *Tester) FindAll(model Model, query ...bson.M) interface{} {
	qry := bson.M{}
	if len(query) > 0 {
		qry = query[0]
	}
	list := GetMeta(model).MakeSlice()
	err := t.Store.M(model).FindAll(nil, list, qry, []string{"_id"}, 0, 0, false, NoTransaction)
	if err != nil {
		panic(err)
	}
	for _, model := range Slice(list) {
		base := model.GetBase()
		*base = B(model.ID())
	}
	return list
}
func (t *Tester) FindLast(model Model, query ...bson.M) Model {
	qry := bson.M{}
	if len(query) > 0 {
		qry = query[0]
	}
	found, err := t.Store.M(model).FindFirst(nil, model, qry, []string{"-_id"}, 0, false)
	if err != nil {
		panic(err)
	} else if !found {
		panic("not found")
	}
	base := model.GetBase()
	*base = B(model.ID())
	return model
}
func (t *Tester) Count(model Model, query ...bson.M) int {
	qry := bson.M{}
	if len(query) > 0 {
		qry = query[0]
	}
	n, err := t.Store.M(model).Count(nil, qry, 0, 0, false, NoTransaction)
	if err != nil {
		panic(err)
	}
	return int(n)
}
func (t *Tester) Refresh(model Model) {
	t.Fetch(model, model.ID())
}
func (t *Tester) Fetch(model Model, id ID) Model {
	found, err := t.Store.M(model).Find(nil, model, id, false)
	if err != nil {
		panic(err)
	} else if !found {
		panic("not found")
	}
	base := model.GetBase()
	*base = B(model.ID())
	return model
}
func (t *Tester) Insert(model Model) Model {
	err := t.Store.M(model).Insert(nil, model)
	if err != nil {
		panic(err)
	}
	base := model.GetBase()
	*base = B(model.ID())
	return model
}
func (t *Tester) Replace(model Model) Model {
	found, err := t.Store.M(model).Replace(nil, model, false)
	if err != nil {
		panic(err)
	} else if !found {
		panic("not found")
	}
	base := model.GetBase()
	*base = B(model.ID())
	return model
}