@Test
public void AsMessageActivity() {

    Activity activity = createActivity();
    activity.setType("message");
    Activity result = activity.asMessageActivity();
    Assert.assertEquals(result.getType(), ActivityTypes.MESSAGE);
}