test mock code cleaning