test_class.declarator: logger = LoggerFactory.getLogger(LoadBalancedListsTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(LoadBalancedListsTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/LoadBalancedListsTest.java
test_class.identifier: LoadBalancedListsTest
test_case.body: @Test
      public void getNext() throws Exception {
          LoadBalancedList<String> list = LoadBalancedLists.synchronizedList(new RoundRobinLoadBalancedList<String>());
  
          // add just one item
          list.set("Item1", 1);
          for (int i = 0; i < 50; i++) {
              Assert.assertTrue("Failed on i=" + i, "Item1".equals(list.getNext()));
          }
  
          // remove it
          list.remove("Item1");
          for (int i = 0; i < 50; i++) {
              Assert.assertTrue("Failed on i=" + i, list.getNext() == null);
          }
  
          // add another item
          list.set("Item2", 1);
          for (int i = 0; i < 50; i++) {
              Assert.assertTrue("Failed on i=" + i, "Item2".equals(list.getNext()));
          }
  
          // reset weight to zero (should remove it)
          list.set("Item2", 0);
          for (int i = 0; i < 50; i++) {
              Assert.assertTrue("Failed on i=" + i, list.getNext() == null);
          }
      }
test_case.class_method_signature: LoadBalancedListsTest.getNext()
test_case.full_signature: @Test public void getNext()
test_case.identifier: getNext
test_case.invocations: synchronizedList set assertTrue equals getNext remove assertTrue getNext set assertTrue equals getNext set assertTrue getNext
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getNext()
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/LoadBalancedLists.java
focal_class.identifier: LoadBalancedLists
focal_class.class_method_signature: LoadBalancedLists.synchronizedList(LoadBalancedList<E> list)
focal_class.full_signature: static public LoadBalancedList<E> synchronizedList(LoadBalancedList<E> list)
focal_class.identifier: synchronizedList
focal_class.modifiers: static public
focal_class.parameters: (LoadBalancedList<E> list)
focal_class.return: LoadBalancedList<E>
focal_class.signature: LoadBalancedList<E> synchronizedList(LoadBalancedList<E> list)
focal_method.body: static public <E> LoadBalancedList<E> synchronizedList(LoadBalancedList<E> list) {
          return new ConcurrentLoadBalancedList<E>(list);
      }
focal_method.class_method_signature: LoadBalancedLists.synchronizedList(LoadBalancedList<E> list)
focal_method.full_signature: static public LoadBalancedList<E> synchronizedList(LoadBalancedList<E> list)
focal_method.identifier: synchronizedList
focal_method.modifiers: static public
focal_method.parameters: (LoadBalancedList<E> list)
focal_method.return: LoadBalancedList<E>
focal_method.signature: LoadBalancedList<E> synchronizedList(LoadBalancedList<E> list)