@Test
void testCompositeNodeNoStart() {

    RuleFlowProcess process = new RuleFlowProcess();
    process.setId("org.drools.core.process.process");
    process.setName("Process");
    StartNode startNode = new StartNode();
    startNode.setName("Start");
    startNode.setId(1);
    process.addNode(startNode);
    EndNode endNode = new EndNode();
    endNode.setName("EndNode");
    endNode.setId(2);
    process.addNode(endNode);
    CompositeNode compositeNode = new CompositeNode();
    compositeNode.setName("CompositeNode");
    compositeNode.setId(3);
    process.addNode(compositeNode);
    new org.jbpm.workflow.core.impl.ConnectionImpl(
            startNode,
            Node.CONNECTION_DEFAULT_TYPE,
            compositeNode,
            Node.CONNECTION_DEFAULT_TYPE
    );
    new org.jbpm.workflow.core.impl.ConnectionImpl(
            compositeNode,
            Node.CONNECTION_DEFAULT_TYPE,
            endNode,
            Node.CONNECTION_DEFAULT_TYPE
    );
    ProcessValidationError[] errors = validator.validateProcess(process);
    assertNotNull(errors);
    assertEquals(1,
                 errors.length);
    assertEquals("Node 'CompositeNode' [3] Composite has no start node defined.",
                 errors[0].getMessage());
}