unit test for get_trailer