SimpleLoggerBalancer balancer = new SimpleLoggerBalancer(0);
List<String> loggers = Arrays.asList("logger1", "logger2", "logger3");
LoggerUser[] tservers = {new TabletServer("tserv1", "logger1", "logger2"), new TabletServer("tserv2", "logger1", "logger2"),
new TabletServer("tserv3", "logger1", "logger2")};
Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
balancer.balance(Arrays.asList(tservers), loggers, assignmentsOut, 2);
Map<String,Integer> computeUses = computeUses(tservers, assignmentsOut, 2);
// make sure our unloaded logger got some work
assertEquals(new Integer(2), computeUses.get("logger3"));
// make sure the other loggers are still used
Integer uses = computeUses.get("logger1").intValue() + computeUses.get("logger2").intValue();