@Test
public void AsInvokeActivity() {

    Activity activity = createActivity();
    activity.setType("invoke");
    Activity result = activity.asInvokeActivity();
    Assert.assertEquals(result.getType(), ActivityTypes.INVOKE);
}