unit test for trial creation