test training code