Added getActivityById and tests