new QName("urn:test:config-mock-binding:1.0", "TestReference")).get(0);
Assert.assertNotNull(bindingService.getServiceMetadata().getRegistrant());
List<BindingModel> svcBindings = bindingService.getServiceMetadata().getRegistrant().getConfig();
Assert.assertEquals(1, svcBindings.size());
ServiceReference implReference = deployment.getDomain().getServiceReference(
new QName("urn:test:config-mock-binding:1.0", "TestService/TestReference"));
Assert.assertNotNull(implReference.getServiceMetadata().getRegistrant());
Assert.assertTrue(implReference.getServiceMetadata().getRegistrant().getConfig() instanceof ComponentImplementationModel);
ServiceReference bindingReference = deployment.getDomain().getServiceReference(
new QName("urn:test:config-mock-binding:1.0", "PromotedTestService"));
Assert.assertNotNull(bindingReference.getServiceMetadata().getRegistrant());
List<BindingModel> refBindings = bindingReference.getServiceMetadata().getRegistrant().getConfig();
Assert.assertEquals(2, refBindings.size());
// SWITCHYARD-1686
ServiceReference compReference = deployment.getDomain().getServiceReference(
new QName("urn:test:config-mock-binding:1.0", "NoService/TestReference"));
Assert.assertNotNull(compReference.getServiceMetadata().getRegistrant());
Assert.assertTrue(compReference.getServiceMetadata().getRegistrant().getConfig() instanceof ComponentImplementationModel);
ServiceRegistry registry = ((DomainImpl) deployment.getDomain()).getServiceRegistry();
deployment.stop();
// ensure we're cleaning up after ourselves.
Assert.assertEquals(0, registry.getServices().size());