@Test
public void testGetMbeanNameName() {

  HashMap<String, String> properties = new HashMap<>();
  ObjectName mBeanName = MBeans.getMBeanName("Service",
      "Name", properties);
  Assert.assertEquals("Service",
      MBeans.getMbeanNameService(mBeanName));
  properties.put("key", "value");
  mBeanName = MBeans.getMBeanName(
      "Service",
      "Name",
      properties);
  Assert.assertEquals("Service",
      MBeans.getMbeanNameService(mBeanName));
}