@SuppressWarnings("deprecation")
  @Test
  public void testLoadBeanDefinition() throws PlatformPluginRegistrationException {
    microPlatform.define(ISolutionRepository.class, FileBasedSolutionRepository.class).init();

    List<IPlatformPlugin> plugins = provider.getPlugins(new StandaloneSession());

    IPlatformPlugin plugin =
        (IPlatformPlugin) CollectionUtils.find(plugins, new PluginNameMatcherPredicate("Plugin 1"));
    assertNotNull("Plugin 1 should have been found", plugin);

    Collection<PluginBeanDefinition> beans = plugin.getBeans();

    assertEquals(
        "FooComponent was not loaded",
        1,
        CollectionUtils.countMatches(
            beans,
            new Predicate() {
              public boolean evaluate(Object object) {
                PluginBeanDefinition bean = (PluginBeanDefinition) object;
                return bean.getBeanId().equals("FooComponent")
                    && bean.getClassname()
                        .equals("org.pentaho.test.platform.plugin.pluginmgr.FooComponent");
              }
            }));
    assertEquals(
        "genericBean was not loaded",
        1,
        CollectionUtils.countMatches(
            beans,
            new Predicate() {
              public boolean evaluate(Object object) {
                PluginBeanDefinition bean = (PluginBeanDefinition) object;
                return bean.getBeanId().equals("genericBean")
                    && bean.getClassname().equals("java.lang.Object");
              }
            }));
  }