package com.orbekk.same;

import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

public class BroadcasterImpl {
    private ConnectionManager connections;
    private Executor executor;

    /**
     * Get a BroadcastRunner for ClientService using a thread pool of size 20.
     */
    public static BroadcasterImpl getDefaultBroadcastRunner() {
        return new BroadcasterImpl(Executors.newFixedThreadPool(20),
                new ConnectionManagerImpl());
    }
    
    public BroadcasterImpl(Executor executor,
            ConnectionManager connections) {
        this.connections = connections;
        this.executor = executor;
    }

    public synchronized void broadcast(final List<String> targets,
            final ServiceOperation operation) {
        for (String t : targets) {
            final ClientService client = connections.getClient(t);
            executor.execute(new Runnable() {
                @Override public void run() {
                    operation.run(client);
                }
            });
        }
    }
}

@@ -149,16 +149,39 @@
 terImpl 
+implements Broadcaster 
 %7B%0A    pr
@@ -404,16 +404,58 @@
 tRunner(
+%0A            ConnectionManager connections
 ) %7B%0A    
@@ -539,13 +539,9 @@
     
-new C
+c
 onne
@@ -549,21 +549,9 @@
 tion
-ManagerImpl()
+s
 );%0A 

Change Broadcaster factory method.