[references] migrate tests and listener