StyleDef styleDef = styleDesc.getDef();
assertEquals("css://ui.button", styleDef.toString());
DefDescriptor<ComponentDef> cmpDesc = definitionService.getDefDescriptor("ui:button", ComponentDef.class);
assertEquals("markup://ui:button", cmpDesc.toString());
ComponentDef componentDef = cmpDesc.getDef();
assertEquals("markup://ui:button", componentDef.toString());
// we can get all definitions the button depends on
List<DefDescriptor<ControllerDef>> controllerDescs = componentDef.getControllerDefDescriptors();
assertEquals(1, controllerDescs.size());
DefDescriptor<ControllerDef> controllerDesc = controllerDescs.get(0);
assertEquals("js://ui.button", controllerDesc.toString());
JavascriptControllerDef controllerDef = (JavascriptControllerDef) controllerDesc.getDef();
String controllerDefFileName = controllerDef.getLocation().getFileName();
assertTrue(controllerDefFileName, controllerDefFileName.endsWith("/ui/button/buttonController.js"));
// we can use getBundle to get all descriptors in the bundle
List<DefDescriptor<?>> bundleDescs = componentDef.getBundle();
assertEquals(3, bundleDescs.size());
assertTrue(bundleDescs.contains(controllerDesc));
// finding java definitions
DefDescriptor<TypeDef> javaDescriptor = definitionService.getDefDescriptor(