public void testNameIsAvailableAtConfigurationItemApplication() {
    EmbeddedConfiguration config = config();
    config.common().nameProvider(new CustomNameProvider());
    config
        .common()
        .add(
            new ConfigurationItem() {

              public void apply(InternalObjectContainer container) {
                Assert.areEqual(CUSTOM_NAME, container.toString());
              }

              public void prepare(Configuration configuration) {}
            });
    assertName(config, CUSTOM_NAME);
  }
 public void testCustom() {
   EmbeddedConfiguration config = config();
   config.common().nameProvider(new CustomNameProvider());
   assertName(config, CUSTOM_NAME);
 }