MgcpCall { public Set<Integer> getConnections(String endpointId) { return Collections.unmodifiableSet(this.entries.get(endpointId)); } 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);  }
@Test(expected = UnsupportedOperationException.class) public void testUnmodifiableConnectionQuery() { final int callId = 10; final MgcpCall call = new MgcpCall(callId); final Set<Integer> connections = call.getConnections("mobicents/cnf/1"); connections.add(1); }