GatewayReceiverMBeanBridge extends ServerBridge { public int getEndPort() { return gatewayReceiver.getEndPort(); } @VisibleForTesting  GatewayReceiverMBeanBridge(GatewayReceiver gatewayReceiver); @Override int getClientConnectionCount(); @Override void stopMonitor(); void addGatewayReceiverStats(GatewayReceiverStats stats); String getBindAddress(); int getPort(); int getSocketBufferSize(); boolean isRunning(); void start(); void stop(); int getEndPort(); String[] getGatewayTransportFilters(); int getStartPort(); int getMaximumTimeBetweenPings(); float getCreateRequestsRate(); float getDestroyRequestsRate(); int getDuplicateBatchesReceived(); int getOutoforderBatchesReceived(); float getUpdateRequestsRate(); float getEventsReceivedRate(); String[] getConnectedGatewaySenders();  }
@Test public void getEndPortDelegatesToGatewayReceiver() { int endPort = 84; when(gatewayReceiver.getEndPort()).thenReturn(endPort); int value = bridge.getEndPort(); assertThat(value).isEqualTo(endPort); }