### Question:
RegistryMgtUIPropertiesServiceComponent { @Reference( name = "registry.service", service = org.wso2.carbon.registry.core.service.RegistryService.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC, unbind = "unsetRegistryService") protected void setRegistryService(RegistryService registryService) { dataHolder.setRegistryService(registryService); }    }### Answer:
@Test public void setRegistryService() throws Exception { RegistryService registryService = mock(RegistryService.class); RegistryMgtUIPropertiesServiceComponent serviceComponent = new RegistryMgtUIPropertiesServiceComponent(); serviceComponent.setRegistryService(registryService); assertEquals(registryService, PropertiesDataHolder.getInstance().getRegistryService()); }