onEnd tests