RtpPortManager implements PortManager { @Override public int getHighest() { return this.maximum; } RtpPortManager(int minimum, int maximum);  RtpPortManager(); @Override int getLowest(); @Override int getHighest(); @Override int next(); int peek(); int current(); static final int MIN_PORT; static final int MAX_PORT; }
@Test public void testEvenHighestPort() { final int minimum = 2; final int maximum = 10; final PortManager portManager = new RtpPortManager(minimum, maximum); assertEquals(maximum, portManager.getHighest()); }
@Test public void testOddHighestPort() { final int minimum = 2; final int maximum = 11; final int maximumEven = 10; final PortManager portManager = new RtpPortManager(minimum, maximum); assertEquals(maximumEven, portManager.getHighest()); }