// Path: src/test/java/com/woinject/stubs/StubSession.java
// public class StubSession extends ERXSession {
//     @Inject
//     @Named("test")
//     private String injectedText;
// 
//     @Override
//     public String toString() {
//         return injectedText;
//     }
// }


import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.ProvisionException;
import com.google.inject.Scope;
import com.webobjects.appserver.WOContext;
import com.webobjects.appserver.WOSession;
import com.woinject.stubs.StubSession;
import er.extensions.appserver.ERXSession;
import er.extensions.appserver.ERXWOContext;

    @Test
    public void bindCurrentWOSessionProvider() throws Exception {
        WOSession result = injector.getInstance(Key.get(WOSession.class, Current.class));

        assertThat(result, is((WOSession) mockSession));
    }

    @Test
    public void bindWORequestScope() throws Exception {
        Scope scope = scopes.get(WORequestScoped.class);

        assertThat(scope == WOScopes.REQUEST, is(true));
    }

    @Test
    public void bindWOSessionScope() throws Exception {
        Scope scope = scopes.get(WOSessionScoped.class);

        assertThat(scope == WOScopes.SESSION, is(true));
    }

    @Test(expected = ProvisionException.class)
    public void exceptionIfProvidingNullContext() throws Exception {
        ERXWOContext.setCurrentContext(null);

        injector.getInstance(Key.get(WOContext.class, Current.class));
    }

    @Test(expected = ProvisionException.class)
// Path: src/test/java/com/woinject/stubs/StubSession.java
// public class StubSession extends ERXSession {
//     @Inject
//     @Named("test")
//     private String injectedText;
// 
//     @Override
//     public String toString() {
//         return injectedText;
//     }
// }


// Path: src/test/java/com/woinject/TestWOInjectModule.java
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.ProvisionException;
import com.google.inject.Scope;
import com.webobjects.appserver.WOContext;
import com.webobjects.appserver.WOSession;
import com.woinject.stubs.StubSession;
import er.extensions.appserver.ERXSession;
import er.extensions.appserver.ERXWOContext;


    @Test
    public void bindCurrentWOSessionProvider() throws Exception {
        WOSession result = injector.getInstance(Key.get(WOSession.class, Current.class));

        assertThat(result, is((WOSession) mockSession));
    }

    @Test
    public void bindWORequestScope() throws Exception {
        Scope scope = scopes.get(WORequestScoped.class);

        assertThat(scope == WOScopes.REQUEST, is(true));
    }

    @Test
    public void bindWOSessionScope() throws Exception {
        Scope scope = scopes.get(WOSessionScoped.class);

        assertThat(scope == WOScopes.SESSION, is(true));
    }

    @Test(expected = ProvisionException.class)
    public void exceptionIfProvidingNullContext() throws Exception {
        ERXWOContext.setCurrentContext(null);

        injector.getInstance(Key.get(WOContext.class, Current.class));
    }

    @Test(expected = ProvisionException.class)
    public void exceptionIfProvidingNullSession() throws Exception {