### Question:
NetworkThroughput { public abstract int delay(Node from, Node to, int delta, int msgSize);  abstract int delay(Node from, Node to, int delta, int msgSize);  }### Answer:
@Test public void testRateTCPLimit() { NetworkLatency nl = new NetworkLatency.NetworkFixedLatency(200 / 2); NetworkThroughput nt = new NetworkThroughput.MathisNetworkThroughput(nl, 64 * 1024); int delay = nt.delay(n1, n2, 0, 2048); Assert.assertEquals(117, delay); }
@Test public void testRateBandwidthLimit() { NetworkLatency nl = new NetworkLatency.NetworkFixedLatency(1000); NetworkThroughput nt = new NetworkThroughput.MathisNetworkThroughput(nl, 5 * 1024 * 1024); int delay = nt.delay(n1, n2, 0, 2048); Assert.assertEquals(1177, delay); }