### Question:
RegistryMgtUIActivitiesServiceComponent { @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) { CommonUtil.setRegistryService(registryService); }    }### Answer:
@Test public void setRegistryService() throws Exception { RegistryService service = mock(RegistryService.class); RegistryMgtUIActivitiesServiceComponent component = new RegistryMgtUIActivitiesServiceComponent(); component.setRegistryService(service); assertEquals(service, CommonUtil.getRegistryService()); }