Use helper func from metricstest package for the unit test (#1268)
Use helper func from metricstest package for the unit test (#1268)

* do not record for empty metric config

* Revert "do not record for empty metric config"

This reverts commit 539a5e4dbba566c407d315f574a1976f1bdc66b4.

* use metricstest package for test
knative/pkg,knative/pkg