private static Log LOG = LogFactory.getLog(TestRpcMetrics.class);
@BeforeClass
public static void setupBeforeClass() throws Exception {
// set custom metrics context
ContextFactory factory = ContextFactory.getFactory();
factory.setAttribute("rpc.class", MockMetricsContext.class.getName());
// make sure metrics context is setup, otherwise updating won't start
MetricsContext ctx = MetricsUtil.getContext("rpc");
assertTrue("Wrong MetricContext implementation class",
(ctx instanceof MockMetricsContext));