// Path: core/src/main/java/com/bazaarvoice/ostrich/PartitionContext.java
// public interface PartitionContext {
//     /**
//      * Gets the default piece of context. In many cases, there is only a single piece of relevant context, which this
//      * method should provide.
//      *
//      * @return The default context data.
//      */
//     Object get();
// 
//     /**
//      * Gets the context for the specified key.
//      * @param key The key for the desired context data.
//      * @return The context data.
//      */
//     Object get(String key);
// 
//     /**
//      * Gets a {@code Map} version of the context. The Map should be immutable.
//      * @return A {@code Map} with the same key/value pairs as this context.
//      */
//     Map<String, Object> asMap();
// }


import com.bazaarvoice.ostrich.PartitionContext;
import com.bazaarvoice.ostrich.partition.PartitionKey;
import com.google.common.collect.ImmutableMap;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
package com.bazaarvoice.ostrich.pool;




public class AnnotationPartitionContextSupplierTest {
    @Test
    public void testImplExtendsIfc() {
        new AnnotationPartitionContextSupplier(List.class, ArrayList.class);
    }

    @SuppressWarnings("unchecked")
    @Test(expected = IllegalArgumentException.class)
    public void testImplDoesntExtendsIfc() {
        new AnnotationPartitionContextSupplier((Class) ArrayList.class, List.class);
    }

    @Test(expected = IllegalStateException.class)
    public void testDuplicateKey() {
        new AnnotationPartitionContextSupplier(MyService.class, MyServiceDup.class);
    }

    @Test
    public void testNoArgs() throws Exception {
        PartitionContextSupplier contextSupplier =
                new AnnotationPartitionContextSupplier(MyService.class, MyServiceImpl.class);
// Path: core/src/main/java/com/bazaarvoice/ostrich/PartitionContext.java
// public interface PartitionContext {
//     /**
//      * Gets the default piece of context. In many cases, there is only a single piece of relevant context, which this
//      * method should provide.
//      *
//      * @return The default context data.
//      */
//     Object get();
// 
//     /**
//      * Gets the context for the specified key.
//      * @param key The key for the desired context data.
//      * @return The context data.
//      */
//     Object get(String key);
// 
//     /**
//      * Gets a {@code Map} version of the context. The Map should be immutable.
//      * @return A {@code Map} with the same key/value pairs as this context.
//      */
//     Map<String, Object> asMap();
// }


// Path: core/src/test/java/com/bazaarvoice/ostrich/pool/AnnotationPartitionContextSupplierTest.java
import com.bazaarvoice.ostrich.PartitionContext;
import com.bazaarvoice.ostrich.partition.PartitionKey;
import com.google.common.collect.ImmutableMap;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

package com.bazaarvoice.ostrich.pool;




public class AnnotationPartitionContextSupplierTest {
    @Test
    public void testImplExtendsIfc() {
        new AnnotationPartitionContextSupplier(List.class, ArrayList.class);
    }

    @SuppressWarnings("unchecked")
    @Test(expected = IllegalArgumentException.class)
    public void testImplDoesntExtendsIfc() {
        new AnnotationPartitionContextSupplier((Class) ArrayList.class, List.class);
    }

    @Test(expected = IllegalStateException.class)
    public void testDuplicateKey() {
        new AnnotationPartitionContextSupplier(MyService.class, MyServiceDup.class);
    }

    @Test
    public void testNoArgs() throws Exception {
        PartitionContextSupplier contextSupplier =
                new AnnotationPartitionContextSupplier(MyService.class, MyServiceImpl.class);
        PartitionContext partitionContext = contextSupplier.forCall(MyService.class.getMethod("noArgs"));