added tests for define after hook and create