move test handler to tests