View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.management.mbeans;
8   
9   import org.mule.management.AbstractMuleJmxTestCase;
10  import org.mule.module.management.mbean.YourKitProfilerServiceMBean;
11  
12  import java.lang.reflect.Method;
13  
14  import org.junit.Test;
15  
16  import static org.junit.Assert.assertTrue;
17  
18  
19  public class YourKitProfilerTestCase extends AbstractMuleJmxTestCase
20  {
21  
22      /**
23       * Each method doen't have to be more than 32
24       * There is a need for intergration with HQ
25       *
26       * @throws Exception
27       */
28      @Test
29      public void testMethodLenght() throws Exception
30      {
31          Method[] methods = YourKitProfilerServiceMBean.class.getMethods();
32          for (int i = 0; i < methods.length; i++)
33          {
34              assertTrue(methods[i].getName(),methods[i].getName().length() < 32);
35          }
36  
37      }
38  
39  }