// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/ContextScopes.java
// public final class ContextScopes {
// 
//     public static final String THREAD = "lep.system.thread";
// 
//     public static final String EXECUTION = "lep.system.execution";
// 
//     /**
//      * Private utils class constructor, to prevent instantiation with reflection API.
//      */
//     private ContextScopes() {
//         throw new IllegalAccessError("not permitted access for utils class");
//     }
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/ScopedContext.java
// public interface ScopedContext extends Context {
// 
//     String getScope();
// 
// }


import static org.junit.Assert.*;
import com.icthh.xm.lep.api.ContextScopes;
import com.icthh.xm.lep.api.ScopedContext;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
package com.icthh.xm.lep.core;



/**
 * The {@link CoreLepManagerThreadContextTest} class.
 */
public class CoreLepManagerThreadContextTest {

    private CoreLepManager manager;

    @Rule
    public ExpectedException thrown = ExpectedException.none();

    @Before
    public void beforeEachTest() {
        manager = new CoreLepManager();
    }

    @After
    public void afterEachTest() {
        manager.destroy();
    }

    @Test
    public void throwsNPEOnNullInitThreadContextAction() {
        thrown.expect(NullPointerException.class);
        thrown.expectMessage("context init action can't be null");

        manager.beginThreadContext(null);
    }

    @Test
    public void getsNullIfThreadContextNotBegin() {
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/ContextScopes.java
// public final class ContextScopes {
// 
//     public static final String THREAD = "lep.system.thread";
// 
//     public static final String EXECUTION = "lep.system.execution";
// 
//     /**
//      * Private utils class constructor, to prevent instantiation with reflection API.
//      */
//     private ContextScopes() {
//         throw new IllegalAccessError("not permitted access for utils class");
//     }
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/ScopedContext.java
// public interface ScopedContext extends Context {
// 
//     String getScope();
// 
// }


// Path: xm-lep-core/src/test/java/com/icthh/xm/lep/core/CoreLepManagerThreadContextTest.java
import static org.junit.Assert.*;
import com.icthh.xm.lep.api.ContextScopes;
import com.icthh.xm.lep.api.ScopedContext;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

package com.icthh.xm.lep.core;



/**
 * The {@link CoreLepManagerThreadContextTest} class.
 */
public class CoreLepManagerThreadContextTest {

    private CoreLepManager manager;

    @Rule
    public ExpectedException thrown = ExpectedException.none();

    @Before
    public void beforeEachTest() {
        manager = new CoreLepManager();
    }

    @After
    public void afterEachTest() {
        manager.destroy();
    }

    @Test
    public void throwsNPEOnNullInitThreadContextAction() {
        thrown.expect(NullPointerException.class);
        thrown.expectMessage("context init action can't be null");

        manager.beginThreadContext(null);
    }

    @Test
    public void getsNullIfThreadContextNotBegin() {
        assertNull(manager.getContext(ContextScopes.THREAD));