throws Exception
{
ModelMgr modelMgr = getProcessServer().getModelMgr();
ModelQualifier qualifier = new ModelQualifier(PROCESSREF);
qualifier.setItemType(ItemTypes.PROCESS);
ProcessItem process = (ProcessItem) modelMgr.getItemByQualifier(qualifier, true);
Node startNode = process.getNodeByName("Start");
assertTrue(startNode instanceof InitialNode);
NodeSocket socket = (NodeSocket) startNode.getDefaultEntrySocket();
List socketDescriptorList = ModelInspectorUtil.determinePossibleExits(socket, WaitStateNode.class, false);
assertEquals(4, socketDescriptorList.size());
Node waitStateNode = process.getNodeByName("WaitState");
assertTrue(waitStateNode instanceof WaitStateNode);
socket = (NodeSocket) waitStateNode.getDefaultEntrySocket();
socketDescriptorList = ModelInspectorUtil.determinePossibleExits(socket, WaitStateNode.class, true);
assertEquals(2, socketDescriptorList.size());