@Test
public void shouldCreateMBeans() throws MalformedObjectNameException {

    MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
    servlet.registerMBeans(mbeanServer);
    assertThat(mbeanServer.queryMBeans(new ObjectName("org.actioncontroller:controller=" + ExampleController.class.getName() + ",action=one"), null))
            .anySatisfy(a -> assertThat(a.getClassName()).contains("ApiControllerActionMXBeanAdaptor"));
}