// Path: plugface-core/src/main/java/org/plugface/core/PluginRef.java
// public final class PluginRef<T> {
// 
//     private final T ref;
//     private final String name;
//     private final Class<T> type;
// 
//     private PluginRef(T ref, String name, Class<T> type) {
//         this.ref = Objects.requireNonNull(ref, "Plugin reference cannot be null");
//         this.name = Objects.requireNonNull(name, "Plugin name cannot be null");
//         this.type = Objects.requireNonNull(type, "Plugin type cannot be null");
//     }
// 
//     @SuppressWarnings("unchecked")
//     public static <T> PluginRef<T> of(T ref, String name) {
//         return new PluginRef<>(ref, name, (Class<T>) ref.getClass());
//     }
// 
//     public T get() {
//         return ref;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public Class<T> getType() {
//         return type;
//     }
// 
// 
// }
// 
// Path: plugface-core/src/test/java/org/plugface/core/plugins/OptionalPlugin.java
// @Plugin(name = "optional")
// public class OptionalPlugin {
// 
//     public String greet() {
//         return "Hello PlugFace!";
//     }
// }
// 
// Path: plugface-core/src/test/java/org/plugface/core/plugins/TestInterface.java
// public interface TestInterface {
// 
//     String greet();
// }
// 
// Path: plugface-core/src/test/java/org/plugface/core/plugins/TestPlugin.java
// @Plugin(name = "test")
// public class TestPlugin extends TestSuperclass {
// 
//     @Override
//     public String greet() {
//         return "Hello PlugFace!";
//     }
// }
// 
// Path: plugface-core/src/test/java/org/plugface/core/plugins/TestSuperclass.java
// public abstract class TestSuperclass implements TestInterface{
// }


import org.plugface.core.plugins.OptionalPlugin;
import org.plugface.core.plugins.TestInterface;
import org.plugface.core.plugins.TestPlugin;
import org.plugface.core.plugins.TestSuperclass;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import org.mockito.MockitoAnnotations;
import org.plugface.core.PluginRef;
package org.plugface.core.impl;

/*-
 * #%L
 * PlugFace :: Core
 * %%
 * Copyright (C) 2017 - 2018 PlugFace
 * %%
 * Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
 * #L%
 */




@SuppressWarnings({"SuspiciousMethodCalls", "ResultOfMethodCallIgnored"})
public class DefaultPluginContextTest {

    private Map<String, Object> registry = new HashMap<>();

    private DefaultPluginContext context;

// Path: plugface-core/src/main/java/org/plugface/core/PluginRef.java
// public final class PluginRef<T> {
// 
//     private final T ref;
//     private final String name;
//     private final Class<T> type;
// 
//     private PluginRef(T ref, String name, Class<T> type) {
//         this.ref = Objects.requireNonNull(ref, "Plugin reference cannot be null");
//         this.name = Objects.requireNonNull(name, "Plugin name cannot be null");
//         this.type = Objects.requireNonNull(type, "Plugin type cannot be null");
//     }
// 
//     @SuppressWarnings("unchecked")
//     public static <T> PluginRef<T> of(T ref, String name) {
//         return new PluginRef<>(ref, name, (Class<T>) ref.getClass());
//     }
// 
//     public T get() {
//         return ref;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public Class<T> getType() {
//         return type;
//     }
// 
// 
// }
// 
// Path: plugface-core/src/test/java/org/plugface/core/plugins/OptionalPlugin.java
// @Plugin(name = "optional")
// public class OptionalPlugin {
// 
//     public String greet() {
//         return "Hello PlugFace!";
//     }
// }
// 
// Path: plugface-core/src/test/java/org/plugface/core/plugins/TestInterface.java
// public interface TestInterface {
// 
//     String greet();
// }
// 
// Path: plugface-core/src/test/java/org/plugface/core/plugins/TestPlugin.java
// @Plugin(name = "test")
// public class TestPlugin extends TestSuperclass {
// 
//     @Override
//     public String greet() {
//         return "Hello PlugFace!";
//     }
// }
// 
// Path: plugface-core/src/test/java/org/plugface/core/plugins/TestSuperclass.java
// public abstract class TestSuperclass implements TestInterface{
// }


// Path: plugface-core/src/test/java/org/plugface/core/impl/DefaultPluginContextTest.java
import org.plugface.core.plugins.OptionalPlugin;
import org.plugface.core.plugins.TestInterface;
import org.plugface.core.plugins.TestPlugin;
import org.plugface.core.plugins.TestSuperclass;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import org.mockito.MockitoAnnotations;
import org.plugface.core.PluginRef;

package org.plugface.core.impl;

/*-
 * #%L
 * PlugFace :: Core
 * %%
 * Copyright (C) 2017 - 2018 PlugFace
 * %%
 * Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
 * #L%
 */




@SuppressWarnings({"SuspiciousMethodCalls", "ResultOfMethodCallIgnored"})
public class DefaultPluginContextTest {

    private Map<String, Object> registry = new HashMap<>();

    private DefaultPluginContext context;

    private TestPlugin plugin = new TestPlugin();