Refactor test for findPort in service pkg