RpcClientMetricsCollector { public void rpcTimedOut(String destination) { Meter specificMeter = metrics.getMeter(identifierPrefix, "timeout", destination); mark(specificMeter, totalNumberOfTimedOutRequests); } RpcClientMetricsCollector(String identifier, Metrics metrics); void rpcCompleted(String destination, Object reply); void rpcTimedOut(String destination);  }
@Test void rpcTimedOut() { sut.rpcTimedOut("req2"); assertThat(metrics.getMeter("rpcClient","completed","total").getCount(), is(0L)); assertThat(metrics.getMeter("rpcClient","completed", "req2").getCount(), is(0L)); assertThat(metrics.getMeter("rpcClient","timeout","total").getCount(), is(1L)); assertThat(metrics.getMeter("rpcClient","timeout","req2").getCount(), is(1L)); }