@Test(expected = UnsupportedOperationException.class) public void testUnmodifiableRemoveConnections() { final int callId = 10; final int bridgeConnection1 = 1; final String bridgeEndpoint = "mobicents/bridge/1"; final MgcpCall call = new MgcpCall(callId); final Set<Integer> removed = call.removeConnections(bridgeEndpoint); removed.add(Integer.valueOf(bridgeConnection1)); }
public Set<Integer> removeConnections(String endpointId) { Set<Integer> removed = this.entries.removeAll(endpointId); if (!removed.isEmpty() && log.isDebugEnabled()) { log.debug("Call " + getCallIdHex() + " unregistered connections " + Arrays.toString(convertToHex(removed)) + " from endpoint " + endpointId); } return removed; }
MgcpCall { public Set<Integer> removeConnections(String endpointId) { Set<Integer> removed = this.entries.removeAll(endpointId); if (!removed.isEmpty() && log.isDebugEnabled()) { log.debug("Call " + getCallIdHex() + " unregistered connections " + Arrays.toString(convertToHex(removed)) + " from endpoint " + endpointId); } return removed; } }
MgcpCall { public Set<Integer> removeConnections(String endpointId) { Set<Integer> removed = this.entries.removeAll(endpointId); if (!removed.isEmpty() && log.isDebugEnabled()) { log.debug("Call " + getCallIdHex() + " unregistered connections " + Arrays.toString(convertToHex(removed)) + " from endpoint " + endpointId); } return removed; } MgcpCall(int callId); }
MgcpCall { public Set<Integer> removeConnections(String endpointId) { Set<Integer> removed = this.entries.removeAll(endpointId); if (!removed.isEmpty() && log.isDebugEnabled()) { log.debug("Call " + getCallIdHex() + " unregistered connections " + Arrays.toString(convertToHex(removed)) + " from endpoint " + endpointId); } return removed; } MgcpCall(int callId); int getCallId(); String getCallIdHex(); Set<String> getEndpoints(); Set<Integer> getConnections(String endpointId); boolean addConnection(String endpointId, int connectionId); boolean removeConnection(String endpointId, int connectionId); Set<Integer> removeConnections(String endpointId); }
MgcpCall { public Set<Integer> removeConnections(String endpointId) { Set<Integer> removed = this.entries.removeAll(endpointId); if (!removed.isEmpty() && log.isDebugEnabled()) { log.debug("Call " + getCallIdHex() + " unregistered connections " + Arrays.toString(convertToHex(removed)) + " from endpoint " + endpointId); } return removed; } MgcpCall(int callId); int getCallId(); String getCallIdHex(); Set<String> getEndpoints(); Set<Integer> getConnections(String endpointId); boolean addConnection(String endpointId, int connectionId); boolean removeConnection(String endpointId, int connectionId); Set<Integer> removeConnections(String endpointId);  }