// Path: vertx-jersey/src/main/java/com/englishtown/vertx/jersey/JerseyHandler.java
// public interface JerseyHandler extends Handler<HttpServerRequest> {
// 
//     /**
//      * @param options
//      * @deprecated Perform initialization at construction time
//      */
//     @Deprecated
//     default void init(JerseyOptions options) {
//         throw new UnsupportedOperationException();
//     }
// 
//     /**
//      * @param container contains configuration details
//      * @deprecated Perform initialization at construction time
//      */
//     @Deprecated
//     default void init(VertxContainer container) {
//         throw new UnsupportedOperationException();
//     }
// 
//     URI getBaseUri();
// 
//     ApplicationHandlerDelegate getDelegate();
// 
//     VertxContainer getContainer();
// 
//     JerseyHandler setContainer(VertxContainer container);
// 
// }
// 
// Path: vertx-jersey/src/main/java/com/englishtown/vertx/jersey/JerseyServerOptions.java
// public interface JerseyServerOptions {
// 
//     /**
//      * Gets the {@link HttpServerOptions} used to set up the vert.x http server
//      *
//      * @return
//      */
//     HttpServerOptions getServerOptions();
// 
// }


import com.englishtown.vertx.jersey.JerseyHandler;
import com.englishtown.vertx.jersey.JerseyServerOptions;
import com.englishtown.vertx.jersey.VertxContainer;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.TypeLiteral;
import org.glassfish.hk2.api.DynamicConfiguration;
import org.glassfish.hk2.api.DynamicConfigurationService;
import org.glassfish.hk2.api.ServiceLocator;
import org.glassfish.jersey.server.model.ModelProcessor;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hk2.guice.bridge.api.GuiceIntoHK2Bridge;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.ext.ReaderInterceptor;
import javax.ws.rs.ext.WriterInterceptor;
import java.util.LinkedHashSet;
import java.util.Set;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.*;
package com.englishtown.vertx.guice;




public class GuiceJerseyServerTest {

    GuiceJerseyServer server;

    @Mock
    JerseyHandler handler;
    @Mock
    VertxContainer container;
    @Mock
    JerseyServerOptions options;
    @Mock
    ServiceLocator locator;
    @Mock
    DynamicConfigurationService dcs;
    @Mock
    DynamicConfiguration dc;
    @Mock
    Injector injector;
    @Mock
    GuiceIntoHK2Bridge bridge;

    @Rule
    public final MockitoRule mockitoRule = MockitoJUnit.rule();

    @Before
    @SuppressWarnings("unchecked")
    public void setUp() throws Exception {

        when(locator.getService(eq(GuiceIntoHK2Bridge.class))).thenReturn(bridge);
        when(locator.getService(eq(DynamicConfigurationService.class))).thenReturn(dcs);
// Path: vertx-jersey/src/main/java/com/englishtown/vertx/jersey/JerseyHandler.java
// public interface JerseyHandler extends Handler<HttpServerRequest> {
// 
//     /**
//      * @param options
//      * @deprecated Perform initialization at construction time
//      */
//     @Deprecated
//     default void init(JerseyOptions options) {
//         throw new UnsupportedOperationException();
//     }
// 
//     /**
//      * @param container contains configuration details
//      * @deprecated Perform initialization at construction time
//      */
//     @Deprecated
//     default void init(VertxContainer container) {
//         throw new UnsupportedOperationException();
//     }
// 
//     URI getBaseUri();
// 
//     ApplicationHandlerDelegate getDelegate();
// 
//     VertxContainer getContainer();
// 
//     JerseyHandler setContainer(VertxContainer container);
// 
// }
// 
// Path: vertx-jersey/src/main/java/com/englishtown/vertx/jersey/JerseyServerOptions.java
// public interface JerseyServerOptions {
// 
//     /**
//      * Gets the {@link HttpServerOptions} used to set up the vert.x http server
//      *
//      * @return
//      */
//     HttpServerOptions getServerOptions();
// 
// }


// Path: vertx-jersey/src/test/java/com/englishtown/vertx/guice/GuiceJerseyServerTest.java
import com.englishtown.vertx.jersey.JerseyHandler;
import com.englishtown.vertx.jersey.JerseyServerOptions;
import com.englishtown.vertx.jersey.VertxContainer;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.TypeLiteral;
import org.glassfish.hk2.api.DynamicConfiguration;
import org.glassfish.hk2.api.DynamicConfigurationService;
import org.glassfish.hk2.api.ServiceLocator;
import org.glassfish.jersey.server.model.ModelProcessor;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hk2.guice.bridge.api.GuiceIntoHK2Bridge;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.ext.ReaderInterceptor;
import javax.ws.rs.ext.WriterInterceptor;
import java.util.LinkedHashSet;
import java.util.Set;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.*;

package com.englishtown.vertx.guice;




public class GuiceJerseyServerTest {

    GuiceJerseyServer server;

    @Mock
    JerseyHandler handler;
    @Mock
    VertxContainer container;
    @Mock
    JerseyServerOptions options;
    @Mock
    ServiceLocator locator;
    @Mock
    DynamicConfigurationService dcs;
    @Mock
    DynamicConfiguration dc;
    @Mock
    Injector injector;
    @Mock
    GuiceIntoHK2Bridge bridge;

    @Rule
    public final MockitoRule mockitoRule = MockitoJUnit.rule();

    @Before
    @SuppressWarnings("unchecked")
    public void setUp() throws Exception {

        when(locator.getService(eq(GuiceIntoHK2Bridge.class))).thenReturn(bridge);
        when(locator.getService(eq(DynamicConfigurationService.class))).thenReturn(dcs);
        when(dcs.createDynamicConfiguration()).thenReturn(dc);