core.addClient(new ClientData(id2, handler2, "host", 3001));
Set<Long> clientsForNotification;
core.subscribeClient(id1, event, -1);
clientsForNotification = core.getClientsForNotification(
new NamespaceNotification("/a/b", event.type, 10));
Assert.assertEquals(1, clientsForNotification.size());
Assert.assertTrue(clientsForNotification.contains(id1));
core.subscribeClient(id2, event, -1);
clientsForNotification = core.getClientsForNotification(
new NamespaceNotification("/a/b", event.type, 10));
Assert.assertEquals(2, clientsForNotification.size());
Assert.assertTrue(clientsForNotification.contains(id1));
Assert.assertTrue(clientsForNotification.contains(id2));
core.unsubscribeClient(id1, event);
clientsForNotification = core.getClientsForNotification(
new NamespaceNotification("/a/b", event.type, 10));
Assert.assertEquals(1, clientsForNotification.size());
Assert.assertTrue(clientsForNotification.contains(id2));
core.unsubscribeClient(id2, event);
clientsForNotification = core.getClientsForNotification(
new NamespaceNotification("/a/b", event.type, 10));
if (clientsForNotification != null)
Assert.assertEquals(0, clientsForNotification.size());
// Test that TransactionIdTooOldException is thrown
try {