// Path: src/main/java/helloworld/creational/abstract_factory/AbstractFactory.java
// public class AbstractFactory {
// 
//     public enum Type {
//         Java, DesignPattern;
//     }
// 
//     private static Map<Type, Class<? extends SplitHelloWorldFactory>> map;
// 
//     static {
//         map = new HashMap<Type, Class<? extends SplitHelloWorldFactory>>();
//         map.put(Type.Java, JavaSplitHelloWorldFactory.class);
//         map.put(Type.DesignPattern, DesignPatternSplitHelloWorldFactory.class);
//     }
// 
//     public static SplitHelloWorldFactory select(Type type) throws IllegalAccessException, InstantiationException {
//         return map.get(type).newInstance();
//     }
// 
// }
// 
// Path: src/main/java/helloworld/creational/abstract_factory/SplitHelloWorldFactory.java
// public interface SplitHelloWorldFactory {
// 
//     public SplitHelloWorld.HelloWorldInterjection createHelloWorldInterjection();
// 
//     public SplitHelloWorld.HelloWorldObject createHelloWorldObject();
// }


import helloworld.creational.abstract_factory.AbstractFactory;
import helloworld.creational.abstract_factory.SplitHelloWorldFactory;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
package helloworld.creational.abstract_factory;



/**
 * @author yihua.huang@dianping.com
 */
public class AbstractFactoryTest {

    @Test
    public void testHelloWorld() throws InstantiationException, IllegalAccessException {
// Path: src/main/java/helloworld/creational/abstract_factory/AbstractFactory.java
// public class AbstractFactory {
// 
//     public enum Type {
//         Java, DesignPattern;
//     }
// 
//     private static Map<Type, Class<? extends SplitHelloWorldFactory>> map;
// 
//     static {
//         map = new HashMap<Type, Class<? extends SplitHelloWorldFactory>>();
//         map.put(Type.Java, JavaSplitHelloWorldFactory.class);
//         map.put(Type.DesignPattern, DesignPatternSplitHelloWorldFactory.class);
//     }
// 
//     public static SplitHelloWorldFactory select(Type type) throws IllegalAccessException, InstantiationException {
//         return map.get(type).newInstance();
//     }
// 
// }
// 
// Path: src/main/java/helloworld/creational/abstract_factory/SplitHelloWorldFactory.java
// public interface SplitHelloWorldFactory {
// 
//     public SplitHelloWorld.HelloWorldInterjection createHelloWorldInterjection();
// 
//     public SplitHelloWorld.HelloWorldObject createHelloWorldObject();
// }


// Path: src/test/java/helloworld/creational/abstract_factory/AbstractFactoryTest.java
import helloworld.creational.abstract_factory.AbstractFactory;
import helloworld.creational.abstract_factory.SplitHelloWorldFactory;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

package helloworld.creational.abstract_factory;



/**
 * @author yihua.huang@dianping.com
 */
public class AbstractFactoryTest {

    @Test
    public void testHelloWorld() throws InstantiationException, IllegalAccessException {
        SplitHelloWorldFactory splitHelloWorldFactory = AbstractFactory.select(AbstractFactory.Type.Java);