+ def 'Start session with Session Manager Exceptions.'() {
+ given: 'the persistence layer throws an Session Manager Exception'
+ mockCpsDataPersistenceService.startSession() >> { throw originalException }
+ when: 'attempt to start session'
+ objectUnderTest.startSession()
+ then: 'the original exception is thrown up'
+ def thrownUp = thrown(SessionManagerException)
+ assert thrownUp == originalException
+ where: 'variations of Session Manager Exception are used'
+ originalException << [ new SessionManagerException('message','details'),
+ new SessionManagerException('message','details', new Exception('cause')),
+ new SessionTimeoutException('message','details', new Exception('cause'))]
+ }
+
+ def 'Close session.'(){