'``AgentServiceFactory.get_service`` creates an ``AgentLoopService``
configured with port 4524 if no port is specified.'

@skipUnless(platform.isLinux(), 'get_era()    only    supports    Linux.')
def test_default_port(self):

    self.config.setContent(yaml.safe_dump({u'control-service': {u'hostname': u'10.0.0.2'}, u'dataset': {u'backend': u'zfs'}, u'version': 1}))
    reactor = MemoryCoreReactor()
    options = DatasetAgentOptions()
    options.parseOptions(['--agent-config', self.config.path])
    service_factory = self.service_factory(deployer_factory=deployer_factory_stub)
    self.assertEqual(AgentLoopService(reactor=reactor, deployer=deployer, host='10.0.0.2', port=4524, context_factory=_context_factory_and_credential(self.config.parent(), '10.0.0.2', 4524).context_factory, era=get_era()), service_factory.get_service(reactor, options))
