Scufl2Tools { @SuppressWarnings("unchecked") public List<BlockingControlLink> controlLinksWaitingFor( Processor untilFinished) { List<BlockingControlLink> controlLinks = new ArrayList<>(); for (ControlLink link : untilFinished.getParent().getControlLinks()) { if (!(link instanceof BlockingControlLink)) continue; BlockingControlLink blockingControlLink = (BlockingControlLink) link; if (blockingControlLink.getUntilFinished().equals(untilFinished)) controlLinks.add(blockingControlLink); } Collections.sort(controlLinks); return controlLinks; }  List<Annotation> annotationsFor(Child<?> bean); List<Annotation> annotationsFor(WorkflowBean bean,
			WorkflowBundle bundle); Configuration configurationFor(Configurable configurable,
			Profile profile); Configuration configurationForActivityBoundToProcessor(
			Processor processor, Profile profile); List<Configuration> configurationsFor(Configurable configurable,
			Profile profile); @SuppressWarnings("unchecked") List<BlockingControlLink> controlLinksBlocking(Processor blocked); @SuppressWarnings("unchecked") List<BlockingControlLink> controlLinksWaitingFor(
			Processor untilFinished); @SuppressWarnings("unchecked") List<DataLink> datalinksFrom(SenderPort senderPort); @SuppressWarnings("unchecked") List<DataLink> datalinksTo(ReceiverPort receiverPort); T findParent(Class<T> parentClass,
			Child<?> child); JsonNode portDefinitionFor(ActivityPort activityPort, Profile profile); ProcessorBinding processorBindingForProcessor(Processor processor,
			Profile profile); List<ProcessorBinding> processorBindingsForProcessor(
			Processor processor, Profile profile); List<ProcessorBinding> processorBindingsToActivity(Activity activity); ProcessorInputPortBinding processorPortBindingForPort(
			InputPort inputPort, Profile profile); ProcessorOutputPortBinding processorPortBindingForPort(
			OutputPort outputPort, Profile profile); void setParents(WorkflowBundle bundle); Set<Processor> possibleDownStreamProcessors(Workflow dataflow,
			Processor processor); Set<Processor> possibleUpStreamProcessors(Workflow dataflow,
			Processor firstProcessor); ProcessorSplit splitProcessors(Collection<Processor> processors,
			Processor splitPoint); Workflow nestedWorkflowForProcessor(Processor processor,
			Profile profile); List<Workflow> nestedWorkflowsForProcessor(Processor processor,
			Profile profile); boolean containsNestedWorkflow(Processor processor); boolean containsNestedWorkflow(Processor processor, Profile profile); void createActivityPortsFromProcessor(Activity activity,
			Processor processor); void createProcessorPortsFromActivity(Processor processor,
			Activity activity); ProcessorBinding bindActivityToProcessorByMatchingPorts(
			Activity activity, Processor processor); void bindActivityToProcessorByMatchingPorts(ProcessorBinding binding); ProcessorBinding createProcessorAndBindingFromActivity(
			Activity activity); Activity createActivityFromProcessor(Processor processor,
			Profile profile); Configuration setAsNestedWorkflow(Processor processor, Workflow childWorkflow, Profile profile); void removePortsBindingForUnknownPorts(ProcessorBinding binding); void updateBindingByMatchingPorts(ProcessorBinding binding); Processor createConstant(Workflow workflow, Profile profile,
			String name); Configuration createConfigurationFor(Activity activity,
			URI configType); Configuration createConfigurationFor(Processor processor,
			Profile profile); void setConstantStringValue(Processor constant, String value,
			Profile profile); String getConstantStringValue(Processor constant, Profile profile); Set<Processor> getConstants(Workflow workflow, Profile profile); void createDefaultIterationStrategyStack(Processor p); static URI PORT_DEFINITION; static URI NESTED_WORKFLOW; static URI CONSTANT; static URI CONSTANT_CONFIG; }
@Test public void controlLinksWaitingFor() { Processor hello = workflowBundle.getMainWorkflow().getProcessors() .getByName("Hello"); Processor wait4me = workflowBundle.getMainWorkflow().getProcessors() .getByName("wait4me"); ControlLink controlLink = workflowBundle.getMainWorkflow().getControlLinks() .iterator().next(); assertEquals(Collections.singletonList(controlLink), scufl2Tools.controlLinksWaitingFor(wait4me)); assertTrue(scufl2Tools.controlLinksWaitingFor(hello).isEmpty()); }