@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())); } }
@Override public void configure(RAWvernaActivityConfigurationBean configBean) throws ActivityConfigurationException { if (configBean.getExampleString().equals("invalidExample")) { throw new ActivityConfigurationException("Example string can't be 'invalidExample'"); } this.configBean = configBean; configurePorts(); }
RAWvernaActivity extends AbstractAsynchronousActivity<RAWvernaActivityConfigurationBean> implements
    AsynchronousActivity<RAWvernaActivityConfigurationBean> { @Override public void configure(RAWvernaActivityConfigurationBean configBean) throws ActivityConfigurationException { if (configBean.getExampleString().equals("invalidExample")) { throw new ActivityConfigurationException("Example string can't be 'invalidExample'"); } this.configBean = configBean; configurePorts(); } }
RAWvernaActivity extends AbstractAsynchronousActivity<RAWvernaActivityConfigurationBean> implements
    AsynchronousActivity<RAWvernaActivityConfigurationBean> { @Override public void configure(RAWvernaActivityConfigurationBean configBean) throws ActivityConfigurationException { if (configBean.getExampleString().equals("invalidExample")) { throw new ActivityConfigurationException("Example string can't be 'invalidExample'"); } this.configBean = configBean; configurePorts(); }  }
RAWvernaActivity extends AbstractAsynchronousActivity<RAWvernaActivityConfigurationBean> implements
    AsynchronousActivity<RAWvernaActivityConfigurationBean> { @Override public void configure(RAWvernaActivityConfigurationBean configBean) throws ActivityConfigurationException { if (configBean.getExampleString().equals("invalidExample")) { throw new ActivityConfigurationException("Example string can't be 'invalidExample'"); } this.configBean = configBean; configurePorts(); }  @Override void configure(RAWvernaActivityConfigurationBean configBean); @SuppressWarnings("unchecked") @Override void executeAsynch(final Map<String, T2Reference> inputs, final AsynchronousActivityCallback callback); @Override RAWvernaActivityConfigurationBean getConfiguration(); }
RAWvernaActivity extends AbstractAsynchronousActivity<RAWvernaActivityConfigurationBean> implements
    AsynchronousActivity<RAWvernaActivityConfigurationBean> { @Override public void configure(RAWvernaActivityConfigurationBean configBean) throws ActivityConfigurationException { if (configBean.getExampleString().equals("invalidExample")) { throw new ActivityConfigurationException("Example string can't be 'invalidExample'"); } this.configBean = configBean; configurePorts(); }  @Override void configure(RAWvernaActivityConfigurationBean configBean); @SuppressWarnings("unchecked") @Override void executeAsynch(final Map<String, T2Reference> inputs, final AsynchronousActivityCallback callback); @Override RAWvernaActivityConfigurationBean getConfiguration();  }