assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());
assertTrue(mbeanConfig.attributeNames().isEmpty());
Set optionalAttributeNames = mbeanConfig.dependencyOptionalAttributeNames();
assertEquals(1, optionalAttributeNames.size());
assertTrue(optionalAttributeNames.contains("SomeName"));
assertEquals("somedomain:somekey=somevalue",
mbeanConfig.getDependencyOptionalAttributeValue("SomeName"));
}