View Javadoc

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