ProcessDefinition processDefinition = this.zebraDefinitionFactory
ZebraProcessDefinition processDefinition = this.zebraDefinitionFactory
	public void testSplitWorkflow(){		ProcessDefinition processDefinition = this.zebraDefinitionFactory				.getAllProcessDefinitionsByName().get(SPLIT);		assertNotNull(processDefinition);		assertEquals(SPLIT, processDefinition.getName());		// how many?		assertTrue(processDefinition.getTaskDefinitions().size() == 6);		// get the first task from process definition		TaskDefinition task = (TaskDefinition) processDefinition.getFirstTask();		// check the name is the same		assertEquals("Manual Activity", task.getName());		// create an iterator, assign it to get routingout		Iterator router = task.getRoutingOut().iterator();		// move up one		RoutingDefinition route = (RoutingDefinition) router.next();		// only one destination		task = (TaskDefinition) route.getDestinationTaskDefinition();		// check the name is the same		assertEquals("Are they a pensioner?", task.getName());		// next is one of three		boolean foundBored = false;		boolean foundPension = false;		boolean foundSurvey = false;		boolean foundPensioner = false;		TaskDefinition bored = null;		TaskDefinition pension = null;		TaskDefinition survey = null;		TaskDefinition pensioner = null;		router = task.getRoutingOut().iterator();		while (router.hasNext()) {			route = (RoutingDefinition) router.next();			task = (TaskDefinition) route.getDestinationTaskDefinition();			if (task.getName().compareTo("Ask if they are bored") == 0) {				// this must also check for "Give them a customer satisfaction				// survey"				foundBored = true;				bored = task;				assertFalse("Paralell is wrong", route.getParallel());			} else if (task.getName().compareTo(					"Give them a customer satisfaction survey") == 0) {				foundSurvey = true;				survey = task;				assertTrue("Paralell is wrong", route.getParallel());			} else if (task.getName().compareTo("Ask if they have a pension") == 0) {				foundPension = true;				pension = task;				assertFalse("Pension is not paralell", route.getParallel());			} else if (task.getName().compareTo("Are they a pensioner") == 0) {				foundPensioner = true;				pensioner = task;				assertFalse("Pensioner is not paralell", route.getParallel());			} else {				assertTrue(false);			}		}		assertTrue(foundSurvey);		assertTrue(foundPensioner);		assertTrue(foundBored);		assertTrue(foundPension);		assertNotNull(pensioner);		checkForletter(pension);		checkForletter(bored);		checkForletter(survey);	}