Implemented unit tests for Plugin.update_port