@Test
public void shouldNotLoadForeignClasses() throws Exception {

    final List<Object> plugins = (List<Object>) manager.loadPlugins(new PluginSource() {
        @Override
        public Collection<Class<?>> load() throws IOException, ClassNotFoundException {
            return newArrayList(TestPlugin.class, String.class);
        }
    });
    assertEquals(1, plugins.size());
    assertTrue(plugins.get(0) instanceof TestPlugin);
}