@Test public void testChooseProcessorAmongEqual() throws Exception { Exchange exchange = mock(Exchange.class); List<Processor> processors = Arrays.asList( createProcessor(0, 0), createProcessor(0, 0) ); OsgiDefaultLoadBalancer balancer = new OsgiDefaultLoadBalancer(); assertThat(balancer.chooseProcessor(processors, exchange), sameInstance(processors.get(0))); }
@Override protected synchronized Processor chooseProcessor(List<Processor> processors, Exchange exchange) { return choose(processors); }
OsgiDefaultLoadBalancer extends QueueLoadBalancer { @Override protected synchronized Processor chooseProcessor(List<Processor> processors, Exchange exchange) { return choose(processors); } }
OsgiDefaultLoadBalancer extends QueueLoadBalancer { @Override protected synchronized Processor chooseProcessor(List<Processor> processors, Exchange exchange) { return choose(processors); }  }
OsgiDefaultLoadBalancer extends QueueLoadBalancer { @Override protected synchronized Processor chooseProcessor(List<Processor> processors, Exchange exchange) { return choose(processors); }   }
OsgiDefaultLoadBalancer extends QueueLoadBalancer { @Override protected synchronized Processor chooseProcessor(List<Processor> processors, Exchange exchange) { return choose(processors); }    }