// Path: src/test/java/com/github/vbauer/caesar/basic/BasicTest.java
// @RunWith(BlockJUnit4ClassRunner.class)
// public abstract class BasicTest {
// 
//     protected final boolean checkUtilConstructorContract(final Class<?>... utilClasses) {
//         Assert.assertTrue(utilClasses.length > 0);
// 
//         PrivateConstructorChecker
//             .forClasses(utilClasses)
//             .expectedTypeOfException(UnsupportedOperationException.class)
//             .check();
// 
//         return true;
//     }
// 
// }
// 
// Path: src/main/java/com/github/vbauer/caesar/runner/AsyncMethodRunnerFactory.java
// public final class AsyncMethodRunnerFactory {
// 
//     public static final String PACKAGE_NAME = "com.github.vbauer.caesar.runner.impl";
// 
//     /**
//      * Immutable list with class names of method runners.
//      *
//      * IMPORTANT:
//      * This classes must be listed in the right order: from more-specific to less-specific classes.
//      */
//     public static final List<String> CLASS_NAMES = Collections.unmodifiableList(
//         Arrays.asList(
//             "ObservableMethodRunner",
//             "ListenableFutureMethodRunner",
//             "FutureCallbackMethodRunner",
//             "FutureMethodRunner",
//             "AsyncCallbackMethodRunner",
//             "SyncMethodRunner"
//         )
//     );
//     
// 
//     private AsyncMethodRunnerFactory() {
//         throw new UnsupportedOperationException();
//     }
// 
// 
//     public static Collection<AsyncMethodRunner> createMethodRunners() {
//         final Collection<String> classNames =
//             ReflectionUtils.classNames(PACKAGE_NAME, CLASS_NAMES);
//         
//         return ReflectionUtils.createObjects(classNames);
//     }
//     
// }


import com.github.vbauer.caesar.basic.BasicTest;
import com.github.vbauer.caesar.runner.AsyncMethodRunnerFactory;
import com.google.common.collect.Lists;
import org.junit.Assert;
import org.junit.Test;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
package com.github.vbauer.caesar.util;



/**
 * @author Vladislav Bauer
 */

public class ReflectionUtilsTest extends BasicTest {

    private static final String CLASS_OBJECT = "java.lang.Object";
    private static final String CLASS_STRING = "java.lang.String";


    @Test
    public void testConstructorContract() {
        Assert.assertTrue(checkUtilConstructorContract(ReflectionUtils.class));
    }

    @Test
    public void testCreateObject() {
        Assert.assertEquals(
            Object.class,
            ReflectionUtils.getClassSafe(ReflectionUtils.createObject(CLASS_OBJECT))
        );
        Assert.assertArrayEquals((Object[]) null, ReflectionUtils.createObject(null));
    }

    @Test
    public void testCreateObjects() {
        final List<Object> objects = Lists.newArrayList(
            ReflectionUtils.createObjects(
                Arrays.asList(CLASS_OBJECT, CLASS_STRING)
            )
        );
        
        Assert.assertEquals(Object.class, objects.get(0).getClass());
        Assert.assertEquals(String.class, objects.get(1).getClass());
        Assert.assertEquals(2, objects.size());
    }

    @Test
    public void testClassNames() {
// Path: src/test/java/com/github/vbauer/caesar/basic/BasicTest.java
// @RunWith(BlockJUnit4ClassRunner.class)
// public abstract class BasicTest {
// 
//     protected final boolean checkUtilConstructorContract(final Class<?>... utilClasses) {
//         Assert.assertTrue(utilClasses.length > 0);
// 
//         PrivateConstructorChecker
//             .forClasses(utilClasses)
//             .expectedTypeOfException(UnsupportedOperationException.class)
//             .check();
// 
//         return true;
//     }
// 
// }
// 
// Path: src/main/java/com/github/vbauer/caesar/runner/AsyncMethodRunnerFactory.java
// public final class AsyncMethodRunnerFactory {
// 
//     public static final String PACKAGE_NAME = "com.github.vbauer.caesar.runner.impl";
// 
//     /**
//      * Immutable list with class names of method runners.
//      *
//      * IMPORTANT:
//      * This classes must be listed in the right order: from more-specific to less-specific classes.
//      */
//     public static final List<String> CLASS_NAMES = Collections.unmodifiableList(
//         Arrays.asList(
//             "ObservableMethodRunner",
//             "ListenableFutureMethodRunner",
//             "FutureCallbackMethodRunner",
//             "FutureMethodRunner",
//             "AsyncCallbackMethodRunner",
//             "SyncMethodRunner"
//         )
//     );
//     
// 
//     private AsyncMethodRunnerFactory() {
//         throw new UnsupportedOperationException();
//     }
// 
// 
//     public static Collection<AsyncMethodRunner> createMethodRunners() {
//         final Collection<String> classNames =
//             ReflectionUtils.classNames(PACKAGE_NAME, CLASS_NAMES);
//         
//         return ReflectionUtils.createObjects(classNames);
//     }
//     
// }


// Path: src/test/java/com/github/vbauer/caesar/util/ReflectionUtilsTest.java
import com.github.vbauer.caesar.basic.BasicTest;
import com.github.vbauer.caesar.runner.AsyncMethodRunnerFactory;
import com.google.common.collect.Lists;
import org.junit.Assert;
import org.junit.Test;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

package com.github.vbauer.caesar.util;



/**
 * @author Vladislav Bauer
 */

public class ReflectionUtilsTest extends BasicTest {

    private static final String CLASS_OBJECT = "java.lang.Object";
    private static final String CLASS_STRING = "java.lang.String";


    @Test
    public void testConstructorContract() {
        Assert.assertTrue(checkUtilConstructorContract(ReflectionUtils.class));
    }

    @Test
    public void testCreateObject() {
        Assert.assertEquals(
            Object.class,
            ReflectionUtils.getClassSafe(ReflectionUtils.createObject(CLASS_OBJECT))
        );
        Assert.assertArrayEquals((Object[]) null, ReflectionUtils.createObject(null));
    }

    @Test
    public void testCreateObjects() {
        final List<Object> objects = Lists.newArrayList(
            ReflectionUtils.createObjects(
                Arrays.asList(CLASS_OBJECT, CLASS_STRING)
            )
        );
        
        Assert.assertEquals(Object.class, objects.get(0).getClass());
        Assert.assertEquals(String.class, objects.get(1).getClass());
        Assert.assertEquals(2, objects.size());
    }

    @Test
    public void testClassNames() {
        final String packageName = AsyncMethodRunnerFactory.PACKAGE_NAME;