'``AgentServiceFactory.get_service`` validates the configuration file.'

def test_config_validated(self):

    self.config.setContent('INVALID')
    reactor = MemoryCoreReactor()
    options = DatasetAgentOptions()
    options.parseOptions(['--agent-config', self.config.path])
    service_factory = self.service_factory(deployer_factory=deployer_factory_stub)
    self.assertRaises(ValidationError, service_factory.get_service, reactor, options)
