'``AgentServiceFactory.get_service`` creates an ``AgentLoopService``
configured with the destination given in the config file given by the
options.'

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

    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.1', port=1234, context_factory=_context_factory_and_credential(self.config.parent(), '10.0.0.1', 1234).context_factory, era=get_era()), service_factory.get_service(reactor, options))
