AggregateConnectionMetrics implements ConnectionMetrics { @Override public long getMeanSendThroughputBitsPerSecond() { long meanThroughput = 0; if (metricsSet.isEmpty()) return meanThroughput; for (ConnectionMetrics metrics : metricsSet) { meanThroughput += metrics.getMeanSendThroughputBitsPerSecond(); } meanThroughput /= metricsSet.size(); return meanThroughput; }  boolean add(ConnectionMetrics connectionMetrics); boolean remove(ConnectionMetrics connectionMetrics); boolean addAll(Collection<? extends ConnectionMetrics> c); boolean removeAll(Collection<?> c); boolean contains(ConnectionMetrics connectionMetrics); boolean isEmpty(); void clear(); @Override long getRequestCount(); @Override long getResponseCount(); @Override long getSentBytesCount(); @Override long getReceivedBytesCount(); @Override void reset(); @Override long getMinBytesPerRequest(); @Override long getMaxBytesPerRequest(); @Override long getMeanBytesPerRequest(); @Override long getMinBytesPerResponse(); @Override long getMaxBytesPerResponse(); @Override long getMeanBytesPerResponse(); @Override long getMinElapsedMilliseconds(); @Override long getMaxElapsedMilliseconds(); @Override long getMeanElapsedMilliseconds(); @Override long getMinSendThroughputBitsPerSecond(); @Override long getMaxSendThroughputBitsPerSecond(); @Override long getMeanSendThroughputBitsPerSecond(); @Override long getMinReceiveThroughputBitsPerSecond(); @Override long getMaxReceiveThroughputBitsPerSecond(); @Override long getMeanReceiveThroughputBitsPerSecond();  }
@Test public void testAggregateMeanSendThroughput() throws Exception { assertThat(metrics.getMeanSendThroughputBitsPerSecond(), is(2000L)); }