test_class.file: socket.io-server/src/test/java/io/socket/socketio/server/SocketIoNamespaceImplTest.java
test_class.identifier: SocketIoNamespaceImplTest
test_case.body: @Test
      public void test_broadcast_multiple_rooms() {
          final SocketIoAdapter adapter = Mockito.mock(SocketIoAdapter.class);
          Mockito.doCallRealMethod().when(adapter)
                  .broadcast(Mockito.any(Packet.class), Mockito.any(String[].class));
          Mockito.doAnswer(invocationOnMock -> {
              final Packet packet = invocationOnMock.getArgument(0);
              final String[] rooms = invocationOnMock.getArgument(1);
              final String[] socketsExcluded = invocationOnMock.getArgument(2);
  
              assertEquals(Parser.EVENT, packet.type);
              assertNotNull(packet.data);
              assertEquals(JSONArray.class, packet.data.getClass());
              assertEquals(1, ((JSONArray) packet.data).length());
              assertEquals("baz", ((JSONArray) packet.data).get(0));
  
              assertNotNull(rooms);
              assertArrayEquals(new String[] { "foo", "bar" }, rooms);
  
              assertNull(socketsExcluded);
  
              return null;
          }).when(adapter).broadcast(Mockito.any(Packet.class), Mockito.any(String[].class), Mockito.isNull());
  
          final SocketIoAdapter.AdapterFactory adapterFactory = Mockito.mock(SocketIoAdapter.AdapterFactory.class);
          Mockito.doAnswer(invocationOnMock -> adapter)
                  .when(adapterFactory)
                  .createAdapter(Mockito.any(SocketIoNamespaceImpl.class));
  
          final SocketIoServer server = Mockito.spy(new SocketIoServer(
                  new EngineIoServer(),
                  SocketIoServerOptions.newFromDefault()
                          .setAdapterFactory(adapterFactory)));
          final SocketIoNamespace namespace = server.namespace("/");
  
          namespace.broadcast(new String[] { "foo", "bar" }, "baz", null);
          Mockito.verify(adapter, Mockito.times(1))
                  .broadcast(Mockito.any(Packet.class), Mockito.any(String[].class), Mockito.isNull());
      }
test_case.class_method_signature: SocketIoNamespaceImplTest.test_broadcast_multiple_rooms()
test_case.full_signature: @Test public void test_broadcast_multiple_rooms()
test_case.identifier: test_broadcast_multiple_rooms
test_case.invocations: mock broadcast when doCallRealMethod any any broadcast when doAnswer getArgument getArgument getArgument assertEquals assertNotNull assertEquals getClass assertEquals length assertEquals get assertNotNull assertArrayEquals assertNull any any isNull mock createAdapter when doAnswer any spy setAdapterFactory newFromDefault namespace broadcast broadcast verify times any any isNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_broadcast_multiple_rooms()
focal_class.declarator: mSockets = new ConcurrentHashMap<>()
focal_class.modifier: @SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
      private final
focal_class.original_string: @SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
      private final Map<String, SocketIoSocket> mSockets = new ConcurrentHashMap<>();
focal_class.type: Map<String, SocketIoSocket>
focal_class.var_name: mSockets
focal_class.declarator: mConnectedSockets = new ConcurrentHashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, SocketIoSocket> mConnectedSockets = new ConcurrentHashMap<>();
focal_class.type: Map<String, SocketIoSocket>
focal_class.var_name: mConnectedSockets
focal_class.declarator: mAckId = new AtomicInteger(0)
focal_class.modifier: private final
focal_class.original_string: private final AtomicInteger mAckId = new AtomicInteger(0);
focal_class.type: AtomicInteger
focal_class.var_name: mAckId
focal_class.file: socket.io-server/src/main/java/io/socket/socketio/server/SocketIoNamespaceImpl.java
focal_class.identifier: SocketIoNamespaceImpl
focal_class.class_method_signature: SocketIoNamespaceImpl.SocketIoNamespaceImpl(SocketIoServer server, String name)
focal_class.full_signature:   SocketIoNamespaceImpl(SocketIoServer server, String name)
focal_class.identifier: SocketIoNamespaceImpl
focal_class.parameters: (SocketIoServer server, String name)
focal_class.signature:  SocketIoNamespaceImpl(SocketIoServer server, String name)
focal_class.class_method_signature: SocketIoNamespaceImpl.broadcast(String[] rooms, String event, Object[] args)
focal_class.full_signature: @Override public void broadcast(String[] rooms, String event, Object[] args)
focal_class.identifier: broadcast
focal_class.modifiers: @Override public
focal_class.parameters: (String[] rooms, String event, Object[] args)
focal_class.return: void
focal_class.signature: void broadcast(String[] rooms, String event, Object[] args)
focal_class.class_method_signature: SocketIoNamespaceImpl.getConnectedSockets()
focal_class.full_signature: @Override Map<String, SocketIoSocket> getConnectedSockets()
focal_class.identifier: getConnectedSockets
focal_class.modifiers: @Override
focal_class.parameters: ()
focal_class.return: Map<String, SocketIoSocket>
focal_class.signature: Map<String, SocketIoSocket> getConnectedSockets()
focal_class.class_method_signature: SocketIoNamespaceImpl.nextId()
focal_class.full_signature:  int nextId()
focal_class.identifier: nextId
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int nextId()
focal_class.class_method_signature: SocketIoNamespaceImpl.add(SocketIoClient client)
focal_class.full_signature: synchronized SocketIoSocket add(SocketIoClient client)
focal_class.identifier: add
focal_class.modifiers: synchronized
focal_class.parameters: (SocketIoClient client)
focal_class.return: SocketIoSocket
focal_class.signature: SocketIoSocket add(SocketIoClient client)
focal_class.class_method_signature: SocketIoNamespaceImpl.remove(SocketIoSocket socket)
focal_class.full_signature: synchronized void remove(SocketIoSocket socket)
focal_class.identifier: remove
focal_class.modifiers: synchronized
focal_class.parameters: (SocketIoSocket socket)
focal_class.return: void
focal_class.signature: void remove(SocketIoSocket socket)
focal_class.class_method_signature: SocketIoNamespaceImpl.addConnected(SocketIoSocket socket)
focal_class.full_signature: synchronized void addConnected(SocketIoSocket socket)
focal_class.identifier: addConnected
focal_class.modifiers: synchronized
focal_class.parameters: (SocketIoSocket socket)
focal_class.return: void
focal_class.signature: void addConnected(SocketIoSocket socket)
focal_class.class_method_signature: SocketIoNamespaceImpl.removeConnected(SocketIoSocket socket)
focal_class.full_signature: synchronized void removeConnected(SocketIoSocket socket)
focal_class.identifier: removeConnected
focal_class.modifiers: synchronized
focal_class.parameters: (SocketIoSocket socket)
focal_class.return: void
focal_class.signature: void removeConnected(SocketIoSocket socket)
focal_class.superclass: extends SocketIoNamespace
focal_method.body: @Override
      public void broadcast(String[] rooms, String event, Object[] args) throws IllegalArgumentException {
          if (event == null) {
              throw new IllegalArgumentException("event cannot be null.");
          }
  
          final Packet packet = PacketUtils.createDataPacket(Parser.EVENT, event, args);
          mAdapter.broadcast(packet, rooms);
      }
focal_method.class_method_signature: SocketIoNamespaceImpl.broadcast(String[] rooms, String event, Object[] args)
focal_method.full_signature: @Override public void broadcast(String[] rooms, String event, Object[] args)
focal_method.identifier: broadcast
focal_method.invocations: createDataPacket broadcast
focal_method.modifiers: @Override public
focal_method.parameters: (String[] rooms, String event, Object[] args)
focal_method.return: void
focal_method.signature: void broadcast(String[] rooms, String event, Object[] args)