How to use the Java API - writing a JUnit Test case and adding various BPMN elements to a simple process (User Task, Service Task, Exclusive Gateway, Timer Event and Message Events), plus handling Process Variables. At the end we briefly discuss testing scopes and mocking in processes.