* @param name
* the component name
* @return a mock of the CC component
*/
private WorkflowDescription mockCcAny(String name) {
WorkflowDescription wf = mock(WorkflowDescription.class);
when(wf.getName()).thenReturn(name);
when(wf.getDataflowId()).thenReturn(CC_DATAFLOW_ID);
List<Port> inputPorts = new ArrayList<Port>(1);
inputPorts.add(new Port("source", "Description", ComponentConstants.VALUE_SOURCE_OBJECT));
when(wf.getInputPorts()).thenReturn(inputPorts);
List<Port> outputPorts = new ArrayList<Port>(1);
outputPorts.add(new Port("cc_output", "Description",
"http://purl.org/DP/quality/measures#1"));
when(wf.getOutputPorts()).thenReturn(outputPorts);
when(wf.handlesMimetype(any(String.class))).thenReturn(true);
return wf;
}