wrote a test for shipFactory