test_class.declarator: defaultManagementMBeanAssembler = new DefaultManagementMBeanAssembler()
test_class.original_string: DefaultManagementMBeanAssembler defaultManagementMBeanAssembler = new DefaultManagementMBeanAssembler();
test_class.type: DefaultManagementMBeanAssembler
test_class.var_name: defaultManagementMBeanAssembler
test_class.file: modules/flowable-jmx/src/test/java/org/flowable/management/jmx/DefaultManagementMBeanAssemblerTest.java
test_class.identifier: DefaultManagementMBeanAssemblerTest
test_case.body: @Test
      public void testHappyPath() throws MalformedObjectNameException, JMException {
          TestMbean testMbean = new TestMbean();
          ModelMBean mbean = defaultManagementMBeanAssembler.assemble(testMbean, new ObjectName("org.flowable.jmx.Mbeans:type=something"));
          assertThat(mbean).isNotNull();
          assertThat(mbean.getMBeanInfo()).isNotNull();
          assertThat(mbean.getMBeanInfo().getAttributes()).isNotNull();
          MBeanAttributeInfo[] attributes = mbean.getMBeanInfo().getAttributes();
          assertThat(attributes).hasSize(2);
          assertThat((attributes[0].getName().equals("TestAttributeString") && attributes[1].getName().equals("TestAttributeBoolean") || (attributes[1].getName().equals("TestAttributeString") && attributes[0]
                  .getName().equals("TestAttributeBoolean")))).isTrue();
          assertThat(mbean.getMBeanInfo().getOperations()).isNotNull();
          MBeanOperationInfo[] operations = mbean.getMBeanInfo().getOperations();
          assertThat(operations).isNotNull();
          assertThat(operations).hasSize(3);
  
      }
test_case.class_method_signature: DefaultManagementMBeanAssemblerTest.testHappyPath()
test_case.full_signature: @Test public void testHappyPath()
test_case.identifier: testHappyPath
test_case.invocations: assemble isNotNull assertThat isNotNull assertThat getMBeanInfo isNotNull assertThat getAttributes getMBeanInfo getAttributes getMBeanInfo hasSize assertThat isTrue assertThat equals getName equals getName equals getName equals getName isNotNull assertThat getOperations getMBeanInfo getOperations getMBeanInfo isNotNull assertThat hasSize assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHappyPath()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(DefaultManagementMBeanAssembler.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(DefaultManagementMBeanAssembler.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: assembler
focal_class.modifier: protected final
focal_class.original_string: protected final MBeanInfoAssembler assembler;
focal_class.type: MBeanInfoAssembler
focal_class.var_name: assembler
focal_class.file: modules/flowable-jmx/src/main/java/org/flowable/management/jmx/DefaultManagementMBeanAssembler.java
focal_class.identifier: DefaultManagementMBeanAssembler
focal_class.interfaces: implements ManagementMBeanAssembler
focal_class.class_method_signature: DefaultManagementMBeanAssembler.DefaultManagementMBeanAssembler()
focal_class.full_signature: public  DefaultManagementMBeanAssembler()
focal_class.identifier: DefaultManagementMBeanAssembler
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  DefaultManagementMBeanAssembler()
focal_class.class_method_signature: DefaultManagementMBeanAssembler.assemble(Object obj, ObjectName name)
focal_class.full_signature: @Override public ModelMBean assemble(Object obj, ObjectName name)
focal_class.identifier: assemble
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj, ObjectName name)
focal_class.return: ModelMBean
focal_class.signature: ModelMBean assemble(Object obj, ObjectName name)
focal_method.body: @Override
      public ModelMBean assemble(Object obj, ObjectName name) throws JMException {
          ModelMBeanInfo mbi = null;
  
          // use the default provided mbean which has been annotated with JMX annotations
          LOGGER.trace("Assembling MBeanInfo for: {} from @ManagedResource object: {}", name, obj);
          mbi = assembler.getMBeanInfo(obj, null, name.toString());
  
          if (mbi == null) {
              return null;
          }
  
          RequiredModelMBean mbean = new RequiredModelMBean(mbi);
  
          try {
              mbean.setManagedResource(obj, "ObjectReference");
          } catch (InvalidTargetObjectTypeException e) {
              throw new JMException(e.getMessage());
          }
  
          // Allows the managed object to send notifications
          if (obj instanceof NotificationSenderAware) {
              ((NotificationSenderAware) obj).setNotificationSender(new NotificationSenderAdapter(mbean));
          }
  
          return mbean;
      }
focal_method.class_method_signature: DefaultManagementMBeanAssembler.assemble(Object obj, ObjectName name)
focal_method.full_signature: @Override public ModelMBean assemble(Object obj, ObjectName name)
focal_method.identifier: assemble
focal_method.invocations: trace getMBeanInfo toString setManagedResource getMessage setNotificationSender
focal_method.modifiers: @Override public
focal_method.parameters: (Object obj, ObjectName name)
focal_method.return: ModelMBean
focal_method.signature: ModelMBean assemble(Object obj, ObjectName name)