Package com.enonic.xp.session

## Class SessionMock

- java.lang.Object
- - com.enonic.xp.session.SessionMock

- All Implemented Interfaces:
    `MutableAttributes`, `ScopeAttributes`, `Session`

      public class SessionMock
      extends Object
      implements Session

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SessionMock()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `<T> T` | `getAttribute​(Class<T> type)` |
    `Object` | `getAttribute​(String key)` |
    `Map<String,​Object>` | `getAttributes()` |
    `SessionKey` | `getKey()` |
    `void` | `invalidate()` |
    `<T> void` | `removeAttribute​(Class<T> type)` |
    `void` | `removeAttribute​(String key)` |
    `void` | `setAttribute​(String key, Object value)` |
    `<T> void` | `setAttribute​(T value)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SessionMock

          public SessionMock()

  - ### Method Detail

    - #### getKey

          public SessionKey getKey()

      Specified by:
        `getKey` in interface `Session`

    - #### getAttribute

          public Object getAttribute​(String key)

      Specified by:
        `getAttribute` in interface `ScopeAttributes`

    - #### getAttribute

          public <T> T getAttribute​(Class<T> type)

      Specified by:
        `getAttribute` in interface `ScopeAttributes`

    - #### setAttribute

          public void setAttribute​(String key,
                                   Object value)

      Specified by:
        `setAttribute` in interface `MutableAttributes`

    - #### setAttribute

          public <T> void setAttribute​(T value)

      Specified by:
        `setAttribute` in interface `MutableAttributes`

    - #### getAttributes

          public Map<String,​Object> getAttributes()

      Specified by:
        `getAttributes` in interface `ScopeAttributes`

    - #### removeAttribute

          public void removeAttribute​(String key)

      Specified by:
        `removeAttribute` in interface `MutableAttributes`

    - #### removeAttribute

          public <T> void removeAttribute​(Class<T> type)

      Specified by:
        `removeAttribute` in interface `MutableAttributes`

    - #### invalidate

          public void invalidate()

      Specified by:
        `invalidate` in interface `Session`