add test for afterInit callback