Package com.verisign.epp.pool

## Class EPPSystemSessionPoolTst

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - com.verisign.epp.pool.EPPSessionPoolTst
      - - com.verisign.epp.pool.EPPSystemSessionPoolTst

- All Implemented Interfaces:
    `junit.framework.Test`

      public class EPPSystemSessionPoolTst
      extends EPPSessionPoolTst

- - ### Field Summary

    - ### Fields inherited from class com.verisign.epp.pool.EPPSessionPoolTst

      `app, configFileName, sessionPool`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPSystemSessionPoolTst​(java.lang.String name)` | Allocates an `EPPSessionPoolTst` with a logical name.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected EPPSession` | `borrowSession​(java.lang.String aSystem)` | Utility method to borrow a session from the session pool.
    `void` | `handleException​(EPPCommandException aException, EPPSession aSession)` | Handle an `EPPCommandException`, which can be either a server generated error or a general exception.
    `protected void` | `invalidateSession​(java.lang.String aSystem, EPPSession aSession)` | Utility method to invalidate a session in the session pool.
    `static void` | `main​(java.lang.String[] args)` | Unit test main, which accepts the following system property options: iterations Number of unit test iterations to run validate Turn XML validation on (`true`) or off (`false`).
    `static void` | `printEnd​(java.lang.String aTest)` | Print the end of a test with the `Thread` name if the current thread is a `TestThread`.
    `static void` | `printStart​(java.lang.String aTest)` | Print the start of a test with the `Thread` name if the current thread is a `TestThread`.
    `protected void` | `returnSession​(java.lang.String aSystem, EPPSession aSession)` | Utility method to return a session to the session pool.
    `protected void` | `setUp()` | JUNIT `setUp` method
    `static junit.framework.Test` | `suite()` | JUNIT `suite` static method, which returns the tests associated with `EPPSessionPoolTst`.
    `protected void` | `tearDown()` | JUNIT `tearDown`, which currently does nothing.
    `void` | `testTwoSystemPools()` | Test interfacing with two system session pools (test1 and test2 systems).

    - ### Methods inherited from class com.verisign.epp.pool.EPPSessionPoolTst

      `borrowSession, invalidateSession, returnSession, testAbsoluteTimeout, testCloseSession, testEndSession, testHello, testIdleTimeout, testPoll`

    - ### Methods inherited from class junit.framework.TestCase

      `countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString`

    - ### Methods inherited from class junit.framework.Assert

      `assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail`

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

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

- - ### Constructor Detail

    - #### EPPSystemSessionPoolTst

          public EPPSystemSessionPoolTst​(java.lang.String name)

      Allocates an `EPPSessionPoolTst` with a logical name. The constructor will initialize the base class `TestCase` with the logical name.
      Parameters:
        `name` - Logical name of the test

  - ### Method Detail

    - #### testTwoSystemPools

          public void testTwoSystemPools()

      Test interfacing with two system session pools (test1 and test2 systems). A session is borrowed from each pool, a hello command is sent, and the sessions are retured to their pools.

    - #### setUp

          protected void setUp()

      JUNIT `setUp` method
      Overrides:
        `setUp` in class `EPPSessionPoolTst`

    - #### tearDown

          protected void tearDown()

      JUNIT `tearDown`, which currently does nothing.
      Overrides:
        `tearDown` in class `EPPSessionPoolTst`

    - #### suite

          public static junit.framework.Test suite()

      JUNIT `suite` static method, which returns the tests associated with `EPPSessionPoolTst`.
      Returns:
        Tests to run

    - #### main

          public static void main​(java.lang.String[] args)

      Unit test main, which accepts the following system property options:
      - iterations Number of unit test iterations to run
      - validate Turn XML validation on (`true`) or off (`false`). If validate is not specified, validation will be off.
      Parameters:
        `args` - Program arguments

    - #### handleException

          public void handleException​(EPPCommandException aException,
                                      EPPSession aSession)

      Handle an `EPPCommandException`, which can be either a server generated error or a general exception. If the exception was caused by a server error, "Server Error : <Response XML>" will be specified. If the exception was caused by a general algorithm error, "General Error : <Exception Description>" will be specified.
      Parameters:
        `aException` - Exception thrown during test
        `aSession` - Session that had exception

    - #### printStart

          public static void printStart​(java.lang.String aTest)

      Print the start of a test with the `Thread` name if the current thread is a `TestThread`.
      Parameters:
        `aTest` - name for the test

    - #### printEnd

          public static void printEnd​(java.lang.String aTest)

      Print the end of a test with the `Thread` name if the current thread is a `TestThread`.
      Parameters:
        `aTest` - name for the test

    - #### borrowSession

          protected EPPSession borrowSession​(java.lang.String aSystem)

      Utility method to borrow a session from the session pool. All exceptions will result in the test failing. This method should only be used for positive session pool tests.
      Parameters:
        `aSystem` - System session pool
      Returns:
        Session from the session pool

    - #### returnSession

          protected void returnSession​(java.lang.String aSystem,
                                       EPPSession aSession)

      Utility method to return a session to the session pool. This should be placed in a finally block. All exceptions will result in the test failing.
      Parameters:
        `aSystem` - session pool name
        `aSession` - Session to return to the pool

    - #### invalidateSession

          protected void invalidateSession​(java.lang.String aSystem,
                                           EPPSession aSession)

      Utility method to invalidate a session in the session pool.
      Parameters:
        `aSystem` - System session pool name
        `aSession` - Session to invalidate in the pool