// Path: src/main/java/com/strandls/alchemy/rest/client/reader/VoidMessageBodyReader.java
// @Provider
// @Produces(MediaType.APPLICATION_OCTET_STREAM)
// @Consumes(MediaType.APPLICATION_OCTET_STREAM)
// public class VoidMessageBodyReader implements MessageBodyReader<Object> {
// 
//     /*
//      * (non-Javadoc)
//      * @see javax.ws.rs.ext.MessageBodyReader#isReadable(java.lang.Class,
//      * java.lang.reflect.Type, java.lang.annotation.Annotation[],
//      * javax.ws.rs.core.MediaType)
//      */
//     @Override
//     public boolean isReadable(final Class<?> type, final Type genericType,
//             final Annotation[] annotations, final MediaType mediaType) {
//         return Void.TYPE.equals(genericType)
//                 && MediaType.APPLICATION_OCTET_STREAM_TYPE.equals(mediaType);
//     }
// 
//     /*
//      * (non-Javadoc)
//      * @see javax.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class,
//      * java.lang.reflect.Type, java.lang.annotation.Annotation[],
//      * javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap,
//      * java.io.InputStream)
//      */
//     @Override
//     public Void readFrom(final Class<Object> type, final Type genericType,
//             final Annotation[] annotations, final MediaType mediaType,
//             final MultivaluedMap<String, String> httpHeaders, final InputStream entityStream)
//                     throws IOException, WebApplicationException {
//         return null;
//     }
// 
// }


import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.security.SecureRandom;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.ProcessingException;
import javax.ws.rs.client.Client;
import javax.ws.rs.core.Application;
import lombok.Cleanup;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.media.multipart.BodyPart;
import org.glassfish.jersey.media.multipart.BodyPartEntity;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.glassfish.jersey.media.multipart.FormDataParam;
import org.glassfish.jersey.media.multipart.MultiPart;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.media.multipart.file.FileDataBodyPart;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.Before;
import org.junit.Test;
import org.reflections.ReflectionUtils;
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
import com.google.common.base.Predicate;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Provides;
import com.google.inject.name.Names;
import com.strandls.alchemy.rest.client.reader.VoidMessageBodyReader;
    /*
     * (non-Javadoc)
     * @see org.glassfish.jersey.test.JerseyTest#configure()
     */
    @Override
    protected Application configure() {
        final ResourceConfig application =
                new ResourceConfig(TestWebserviceWithPath.class, TestWebserviceWithPutDelete.class,
                        TestWebserviceMultipart.class, TestWebserviceExceptionHandling.class,
                        JacksonJsonProvider.class);
        final Injector injector =
                Guice.createInjector(new ClientModule(), new ExceptionObjectMapperModule());

        // register multi part feature.
        application.register(MultiPartFeature.class);

        // register the application mapper.
        application.register(injector.getInstance(TestExceptionMapper.class));
        return application;
    }

    /*
     * (non-Javadoc)
     * @see
     * org.glassfish.jersey.test.JerseyTest#configureClient(org.glassfish.jersey
     * .client.ClientConfig)
     */
    @Override
    protected void configureClient(final ClientConfig config) {
        super.configureClient(config);
// Path: src/main/java/com/strandls/alchemy/rest/client/reader/VoidMessageBodyReader.java
// @Provider
// @Produces(MediaType.APPLICATION_OCTET_STREAM)
// @Consumes(MediaType.APPLICATION_OCTET_STREAM)
// public class VoidMessageBodyReader implements MessageBodyReader<Object> {
// 
//     /*
//      * (non-Javadoc)
//      * @see javax.ws.rs.ext.MessageBodyReader#isReadable(java.lang.Class,
//      * java.lang.reflect.Type, java.lang.annotation.Annotation[],
//      * javax.ws.rs.core.MediaType)
//      */
//     @Override
//     public boolean isReadable(final Class<?> type, final Type genericType,
//             final Annotation[] annotations, final MediaType mediaType) {
//         return Void.TYPE.equals(genericType)
//                 && MediaType.APPLICATION_OCTET_STREAM_TYPE.equals(mediaType);
//     }
// 
//     /*
//      * (non-Javadoc)
//      * @see javax.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class,
//      * java.lang.reflect.Type, java.lang.annotation.Annotation[],
//      * javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap,
//      * java.io.InputStream)
//      */
//     @Override
//     public Void readFrom(final Class<Object> type, final Type genericType,
//             final Annotation[] annotations, final MediaType mediaType,
//             final MultivaluedMap<String, String> httpHeaders, final InputStream entityStream)
//                     throws IOException, WebApplicationException {
//         return null;
//     }
// 
// }


// Path: src/test/java/com/strandls/alchemy/rest/client/AlchemyRestClientFactoryTest.java
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.security.SecureRandom;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.ProcessingException;
import javax.ws.rs.client.Client;
import javax.ws.rs.core.Application;
import lombok.Cleanup;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.media.multipart.BodyPart;
import org.glassfish.jersey.media.multipart.BodyPartEntity;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.glassfish.jersey.media.multipart.FormDataParam;
import org.glassfish.jersey.media.multipart.MultiPart;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.media.multipart.file.FileDataBodyPart;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.Before;
import org.junit.Test;
import org.reflections.ReflectionUtils;
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
import com.google.common.base.Predicate;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Provides;
import com.google.inject.name.Names;
import com.strandls.alchemy.rest.client.reader.VoidMessageBodyReader;

    /*
     * (non-Javadoc)
     * @see org.glassfish.jersey.test.JerseyTest#configure()
     */
    @Override
    protected Application configure() {
        final ResourceConfig application =
                new ResourceConfig(TestWebserviceWithPath.class, TestWebserviceWithPutDelete.class,
                        TestWebserviceMultipart.class, TestWebserviceExceptionHandling.class,
                        JacksonJsonProvider.class);
        final Injector injector =
                Guice.createInjector(new ClientModule(), new ExceptionObjectMapperModule());

        // register multi part feature.
        application.register(MultiPartFeature.class);

        // register the application mapper.
        application.register(injector.getInstance(TestExceptionMapper.class));
        return application;
    }

    /*
     * (non-Javadoc)
     * @see
     * org.glassfish.jersey.test.JerseyTest#configureClient(org.glassfish.jersey
     * .client.ClientConfig)
     */
    @Override
    protected void configureClient(final ClientConfig config) {
        super.configureClient(config);
        config.register(VoidMessageBodyReader.class);