func (suite *WMPriceManagerSuite) setValidatorByDist(votes ...int64) {
	vals := []ValidatorAndVotes{}
	for i, v := range votes {
		vals = append(vals, ValidatorAndVotes{
			ValidatorName: linotypes.AccountKey(fmt.Sprintf("val%d", i+1)),
			ReceivedVotes: linotypes.NewCoinFromInt64(v),
		})
	}
	suite.setValidators(vals)
}
setup validators from "val1", "val2" ...."valx".
package manager
import (
	"fmt"
	"sort"
	"testing"
	"time"
	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/stretchr/testify/mock"
	"github.com/stretchr/testify/suite"
	"github.com/lino-network/lino/param"
	mparam "github.com/lino-network/lino/param/mocks"
	"github.com/lino-network/lino/testsuites"
	"github.com/lino-network/lino/testutils"
	linotypes "github.com/lino-network/lino/types"
	"github.com/lino-network/lino/x/price/model"
	"github.com/lino-network/lino/x/price/types"
	mval "github.com/lino-network/lino/x/validator/mocks"
	valmodel "github.com/lino-network/lino/x/validator/model"
)
type ValidatorAndVotes = valmodel.ReceivedVotesStatus
var (
	storeKeyStr = "priceStoreTestKey"
	storeKey    = sdk.NewKVStoreKey(storeKeyStr)
	genesisPrice = linotypes.NewMiniDollar(1200)
)
type PriceStoreDumper struct{}
func (dumper PriceStoreDumper) NewDumper() *testutils.Dumper {
	return model.NewPriceDumper(model.NewPriceStorage(storeKey))
}
type WMPriceManagerSuite struct {
	testsuites.GoldenTestSuite
	manager WeightedMedianPriceManager
	mParam *mparam.ParamKeeper
	mVal   *mval.ValidatorKeeper
}
func NewPriceManagerSuite() *WMPriceManagerSuite {
	return &WMPriceManagerSuite{
		GoldenTestSuite: testsuites.NewGoldenTestSuite(PriceStoreDumper{}, storeKey),
	}
}
func (suite *WMPriceManagerSuite) SetupTest() {
	suite.mParam = new(mparam.ParamKeeper)
	suite.mVal = new(mval.ValidatorKeeper)
	suite.manager = NewWeightedMedianPriceManager(
		storeKey, suite.mVal, suite.mParam)
	suite.SetupCtx(0, time.Unix(0, 0), storeKey)
}
func (suite *WMPriceManagerSuite) setValidators(vals []ValidatorAndVotes) {
	suite.mVal = new(mval.ValidatorKeeper)
	suite.manager.val = suite.mVal
	suite.mVal.On("GetCommittingValidatorVoteStatus", mock.Anything).Return(vals)
	names := toValNames(vals)
	suite.mVal.On("GetCommittingValidators", mock.Anything).Return(names)
}