Finished getMethodInvocations method for #33