SimpleManagedResource extends AbstractManagedResource { @Override protected ManagedDescription getResourceDescription(PathAddressIterator iterator) { if (iterator.hasNext()) { String name = iterator.next(); AbstractManagedResource resource = findDescendant(iterator, name, new StringBuilder()); return (resource != null) ? resource.getResourceDescription(iterator) : null; } else { return description; } } SimpleManagedResource(PathElement pathElement, AbstractManagedResource parent, ManagedDescription description); @Override Registration registerSubResource(String name, ManagedDescription description); @Override void registerOperationHandler(String operationName, OperationHandler operationHandler, ManagedDescription description); @Override void registerOperationHandler(String operationName, OperationHandler operationHandler, ManagedDescription description, boolean inherited); @Override ManagedResource getSubResource(String childName);  }
@Test public void rootRegistration() { SimpleManagedResource root = createRootResource(); assertEquals(ROOT_DESC.getDescription(), root.getResourceDescription(PathAddress.EMPTY_ADDRESS).getDescription()); }