@Test
public void AsHandoffActivity() {

    Activity activity = createActivity();
    activity.setType("handoff");
    Activity result = activity.asHandoffActivity();
    Assert.assertEquals(result.getType(), ActivityTypes.HANDOFF);
}