test lifecycle hooks