test_class.file: core/src/test/java/dk/alexandra/fresco/lib/helper/ParallelProtocolProducerTest.java
test_class.identifier: ParallelProtocolProducerTest
test_case.body: @Test
    public void iterate() {
      Iterator<ProtocolProducer> iterator = mock(Iterator.class);
      ProtocolCollection protocolCollection = mock(ProtocolCollection.class);
      ProtocolProducer protocolProducer = mock(ProtocolProducer.class);
  
      when(iterator.hasNext()).thenReturn(true, false);
      when(protocolCollection.hasFreeCapacity()).thenReturn(true);
      when(protocolProducer.hasNextProtocols()).thenReturn(false);
      when(iterator.next()).thenReturn(protocolProducer);
  
      List<ProtocolProducer> list = Arrays.asList(protocolProducer);
      ParallelProtocolProducer parallelProtocolProducer =
          new ParallelProtocolProducer(list);
      parallelProtocolProducer.iterate(iterator, protocolCollection);
  
      verify(iterator, times(1)).remove();
    }
test_case.class_method_signature: ParallelProtocolProducerTest.iterate()
test_case.full_signature: @Test public void iterate()
test_case.identifier: iterate
test_case.invocations: mock mock mock thenReturn when hasNext thenReturn when hasFreeCapacity thenReturn when hasNextProtocols thenReturn when next asList iterate remove verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void iterate()
focal_class.declarator: subProducers
focal_class.modifier: private final
focal_class.original_string: private final Deque<ProtocolProducer> subProducers;
focal_class.type: Deque<ProtocolProducer>
focal_class.var_name: subProducers
focal_class.file: core/src/main/java/dk/alexandra/fresco/lib/helper/ParallelProtocolProducer.java
focal_class.identifier: ParallelProtocolProducer
focal_class.interfaces: implements ProtocolProducer
focal_class.class_method_signature: ParallelProtocolProducer.ParallelProtocolProducer(List<ProtocolProducer> protocols)
focal_class.full_signature: public  ParallelProtocolProducer(List<ProtocolProducer> protocols)
focal_class.identifier: ParallelProtocolProducer
focal_class.modifiers: public
focal_class.parameters: (List<ProtocolProducer> protocols)
focal_class.signature:  ParallelProtocolProducer(List<ProtocolProducer> protocols)
focal_class.class_method_signature: ParallelProtocolProducer.hasNextProtocols()
focal_class.full_signature: @Override public boolean hasNextProtocols()
focal_class.identifier: hasNextProtocols
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasNextProtocols()
focal_class.class_method_signature: ParallelProtocolProducer.getNextProtocols(
        ProtocolCollection<ResourcePoolT> protocolCollection)
focal_class.full_signature: @Override public void getNextProtocols(
        ProtocolCollection<ResourcePoolT> protocolCollection)
focal_class.identifier: getNextProtocols
focal_class.modifiers: @Override public
focal_class.parameters: (
        ProtocolCollection<ResourcePoolT> protocolCollection)
focal_class.return: void
focal_class.signature: void getNextProtocols(
        ProtocolCollection<ResourcePoolT> protocolCollection)
focal_class.class_method_signature: ParallelProtocolProducer.iterate(
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection)
focal_class.full_signature: protected void iterate(
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection)
focal_class.identifier: iterate
focal_class.modifiers: protected
focal_class.parameters: (
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection)
focal_class.return: void
focal_class.signature: void iterate(
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection)
focal_method.body: protected <ResourcePoolT extends ResourcePool> void iterate(
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection) {
      while (iterator.hasNext() && protocolCollection.hasFreeCapacity()) {
        ProtocolProducer producer = iterator.next();
        if (producer.hasNextProtocols()) {
          producer.getNextProtocols(protocolCollection);
        } else {
          iterator.remove();
        }
      }
    }
focal_method.class_method_signature: ParallelProtocolProducer.iterate(
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection)
focal_method.full_signature: protected void iterate(
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection)
focal_method.identifier: iterate
focal_method.invocations: hasNext hasFreeCapacity next hasNextProtocols getNextProtocols remove
focal_method.modifiers: protected
focal_method.parameters: (
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection)
focal_method.return: void
focal_method.signature: void iterate(
        Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection)