'``AgentService.from_configuration`` returns an ``AgentService``
instance with all of its fields initialized from parts of the
configuration passed in.'

def test_initialized(self):

    host = '192.0.2.13'
    port = 2314
    name = u'from_config-test'
    setup_config(self, control_address=host, control_port=port, name=name)
    options = DatasetAgentOptions()
    options.parseOptions(['--agent-config', self.config.path])
    config = get_configuration(options)
    agent_service = AgentService.from_configuration(config)
    self.assertEqual(AgentService(control_service_host=host, control_service_port=port, node_credential=None, ca_certificate=self.ca_set.root.credential.certificate, backend_description=ZFS, api_args={'name': name, 'mount_root': self.config.sibling('mount_root').path, 'volume_config_path': self.config.sibling('volume_config.json').path}), agent_service.set(node_credential=None))
    self.assertEqual(self.ca_set.node.transform(['credential', 'path'], None), agent_service.node_credential.transform(['credential', 'path'], None))
