add tests for trainer