Using MetricConfiguration factory instead of generating mock objects