@Test
public void configureActivity() throws Exception {

    Set<String> expectedInputs = new HashSet<String>();
    expectedInputs.add("firstInput");
    Set<String> expectedOutputs = new HashSet<String>();
    expectedOutputs.add("simpleOutput");
    expectedOutputs.add("moreOutputs");
    activity.configure(configBean);
    Set<ActivityInputPort> inputPorts = activity.getInputPorts();
    assertEquals(expectedInputs.size(), inputPorts.size());
    for (ActivityInputPort inputPort : inputPorts) {
        assertTrue("Wrong input : " + inputPort.getName(), expectedInputs.remove(inputPort.getName()));
    }
    Set<OutputPort> outputPorts = activity.getOutputPorts();
    assertEquals(expectedOutputs.size(), outputPorts.size());
    for (OutputPort outputPort : outputPorts) {
        assertTrue("Wrong output : " + outputPort.getName(), expectedOutputs.remove(outputPort.getName()));
    }
}