Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Copyright 2015 AT&T Foundry |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | * |
| 17 | */ |
| 18 | package org.onosproject.aaa; |
| 19 | |
| 20 | import org.junit.After; |
| 21 | import org.junit.Assert; |
| 22 | import org.junit.Before; |
| 23 | import org.junit.Test; |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 24 | import static org.junit.Assert.*; |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 25 | |
| 26 | |
| 27 | public class StateMachineTest { |
| 28 | StateMachine stateMachine = null; |
| 29 | |
| 30 | @Before |
| 31 | public void setUp() { |
| 32 | System.out.println("Set Up."); |
| 33 | StateMachine.bitSet.clear(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 34 | StateMachine.initializeMaps(); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 35 | stateMachine = new StateMachine("session0", null); |
| 36 | } |
| 37 | |
| 38 | @After |
| 39 | public void tearDown() { |
| 40 | System.out.println("Tear Down."); |
| 41 | StateMachine.bitSet.clear(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 42 | StateMachine.destroyMaps(); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 43 | stateMachine = null; |
| 44 | } |
| 45 | |
| 46 | @Test |
| 47 | /** |
| 48 | * Test all the basic inputs from state to state: IDLE -> STARTED -> PENDING -> AUTHORIZED -> IDLE |
| 49 | */ |
| 50 | public void basic() throws StateMachineException { |
| 51 | System.out.println("======= BASIC =======."); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 52 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_IDLE); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 53 | |
| 54 | stateMachine.start(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 55 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_STARTED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 56 | |
| 57 | stateMachine.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 58 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_PENDING); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 59 | |
| 60 | stateMachine.authorizeAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 61 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_AUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 62 | |
| 63 | stateMachine.logoff(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 64 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_IDLE); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | @Test |
| 68 | /** |
| 69 | * Test all inputs from an IDLE state (starting with the ones that are not impacting the current state) |
| 70 | */ |
| 71 | public void testIdleState() throws StateMachineException { |
| 72 | System.out.println("======= IDLE STATE TEST =======."); |
| 73 | stateMachine.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 74 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_IDLE); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 75 | |
| 76 | stateMachine.authorizeAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 77 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_IDLE); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 78 | |
| 79 | stateMachine.denyAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 80 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_IDLE); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 81 | |
| 82 | stateMachine.logoff(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 83 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_IDLE); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 84 | |
| 85 | stateMachine.start(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 86 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_STARTED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | @Test |
| 90 | /** |
| 91 | * Test all inputs from an STARTED state (starting with the ones that are not impacting the current state) |
| 92 | */ |
| 93 | public void testStartedState() throws StateMachineException { |
| 94 | System.out.println("======= STARTED STATE TEST =======."); |
| 95 | stateMachine.start(); |
| 96 | |
| 97 | stateMachine.authorizeAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 98 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_STARTED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 99 | |
| 100 | stateMachine.denyAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 101 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_STARTED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 102 | |
| 103 | stateMachine.logoff(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 104 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_STARTED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 105 | |
| 106 | stateMachine.start(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 107 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_STARTED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 108 | |
| 109 | stateMachine.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 110 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_PENDING); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | @Test |
| 114 | /** |
| 115 | * Test all inputs from a PENDING state (starting with the ones that are not impacting the current state). |
| 116 | * The next valid state for this test is AUTHORIZED |
| 117 | */ |
| 118 | public void testPendingStateToAuthorized() throws StateMachineException { |
| 119 | System.out.println("======= PENDING STATE TEST (AUTHORIZED) =======."); |
| 120 | stateMachine.start(); |
| 121 | stateMachine.requestAccess(); |
| 122 | |
| 123 | stateMachine.logoff(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 124 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_PENDING); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 125 | |
| 126 | stateMachine.start(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 127 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_PENDING); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 128 | |
| 129 | stateMachine.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 130 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_PENDING); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 131 | |
| 132 | stateMachine.authorizeAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 133 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_AUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 134 | |
| 135 | stateMachine.denyAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 136 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_AUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | @Test |
| 140 | /** |
| 141 | * Test all inputs from an PENDING state (starting with the ones that are not impacting the current state). |
| 142 | * The next valid state for this test is UNAUTHORIZED |
| 143 | */ |
| 144 | public void testPendingStateToUnauthorized() throws StateMachineException { |
| 145 | System.out.println("======= PENDING STATE TEST (DENIED) =======."); |
| 146 | stateMachine.start(); |
| 147 | stateMachine.requestAccess(); |
| 148 | |
| 149 | stateMachine.logoff(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 150 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_PENDING); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 151 | |
| 152 | stateMachine.start(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 153 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_PENDING); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 154 | |
| 155 | stateMachine.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 156 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_PENDING); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 157 | |
| 158 | stateMachine.denyAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 159 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_UNAUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 160 | |
| 161 | stateMachine.authorizeAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 162 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_UNAUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 163 | } |
| 164 | |
| 165 | @Test |
| 166 | /** |
| 167 | * Test all inputs from an AUTHORIZED state (starting with the ones that are not impacting the current state). |
| 168 | */ |
| 169 | public void testAuthorizedState() throws StateMachineException { |
| 170 | System.out.println("======= AUTHORIZED STATE TEST =======."); |
| 171 | stateMachine.start(); |
| 172 | stateMachine.requestAccess(); |
| 173 | stateMachine.authorizeAccess(); |
| 174 | |
| 175 | stateMachine.start(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 176 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_AUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 177 | |
| 178 | stateMachine.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 179 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_AUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 180 | |
| 181 | stateMachine.authorizeAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 182 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_AUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 183 | |
| 184 | stateMachine.denyAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 185 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_AUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 186 | |
| 187 | stateMachine.logoff(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 188 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_IDLE); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 189 | } |
| 190 | |
| 191 | @Test |
| 192 | /** |
| 193 | * Test all inputs from an UNAUTHORIZED state (starting with the ones that are not impacting the current state). |
| 194 | */ |
| 195 | public void testUnauthorizedState() throws StateMachineException { |
| 196 | System.out.println("======= UNAUTHORIZED STATE TEST =======."); |
| 197 | stateMachine.start(); |
| 198 | stateMachine.requestAccess(); |
| 199 | stateMachine.denyAccess(); |
| 200 | |
| 201 | stateMachine.start(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 202 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_UNAUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 203 | |
| 204 | stateMachine.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 205 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_UNAUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 206 | |
| 207 | stateMachine.authorizeAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 208 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_UNAUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 209 | |
| 210 | stateMachine.denyAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 211 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_UNAUTHORIZED); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 212 | |
| 213 | stateMachine.logoff(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 214 | Assert.assertEquals(stateMachine.state(), StateMachine.STATE_IDLE); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | |
| 218 | @Test |
| 219 | public void testIdentifierAvailability() throws StateMachineException { |
| 220 | System.out.println("======= IDENTIFIER TEST =======."); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 221 | byte identifier = stateMachine.identifier(); |
| 222 | System.out.println("State: " + stateMachine.state()); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 223 | System.out.println("Identifier: " + Byte.toUnsignedInt(identifier)); |
| 224 | Assert.assertEquals(-1, identifier); |
| 225 | stateMachine.start(); |
| 226 | |
| 227 | |
| 228 | StateMachine sm247 = null; |
| 229 | StateMachine sm3 = null; |
| 230 | |
| 231 | |
| 232 | //create 255 others state machines |
| 233 | for (int i = 1; i <= 255; i++) { |
| 234 | StateMachine sm = new StateMachine("session" + i, null); |
| 235 | sm.start(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 236 | byte id = sm.identifier(); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 237 | Assert.assertEquals(i, Byte.toUnsignedInt(id)); |
| 238 | if (i == 3) { |
| 239 | sm3 = sm; |
| 240 | System.out.println("SM3: " + sm3.toString()); |
| 241 | } |
| 242 | if (i == 247) { |
| 243 | sm247 = sm; |
| 244 | System.out.println("SM247: " + sm247.toString()); |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | //simulate the state machine for a specific session and logoff so we can free up a spot for an identifier |
| 249 | //let's choose identifier 247 then we free up 3 |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 250 | Assert.assertNotNull(sm247); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 251 | sm247.requestAccess(); |
| 252 | sm247.authorizeAccess(); |
| 253 | sm247.logoff(); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 254 | |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 255 | Assert.assertNotNull(sm3); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 256 | sm3.requestAccess(); |
| 257 | sm3.authorizeAccess(); |
| 258 | sm3.logoff(); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 259 | |
| 260 | StateMachine otherSM3 = new StateMachine("session3b", null); |
| 261 | otherSM3.start(); |
| 262 | otherSM3.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 263 | byte id3 = otherSM3.identifier(); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 264 | Assert.assertEquals(3, Byte.toUnsignedInt(id3)); |
| 265 | |
| 266 | StateMachine otherSM247 = new StateMachine("session247b", null); |
| 267 | otherSM247.start(); |
| 268 | otherSM247.requestAccess(); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 269 | byte id247 = otherSM247.identifier(); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 270 | Assert.assertEquals(247, Byte.toUnsignedInt(id247)); |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 271 | } |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 272 | |
Ray Milkey | 75879ef | 2015-09-24 16:34:02 -0700 | [diff] [blame^] | 273 | @Test |
| 274 | public void testSessionIdLookups() { |
| 275 | String sessionId1 = "session1"; |
| 276 | String sessionId2 = "session2"; |
| 277 | String sessionId3 = "session3"; |
| 278 | |
| 279 | StateMachine machine1ShouldBeNull = |
| 280 | StateMachine.lookupStateMachineBySessionId(sessionId1); |
| 281 | assertNull(machine1ShouldBeNull); |
| 282 | StateMachine machine2ShouldBeNull = |
| 283 | StateMachine.lookupStateMachineBySessionId(sessionId2); |
| 284 | assertNull(machine2ShouldBeNull); |
| 285 | |
| 286 | StateMachine stateMachine1 = new StateMachine(sessionId1, null); |
| 287 | StateMachine stateMachine2 = new StateMachine(sessionId2, null); |
| 288 | |
| 289 | assertEquals(stateMachine1, |
| 290 | StateMachine.lookupStateMachineBySessionId(sessionId1)); |
| 291 | assertEquals(stateMachine2, |
| 292 | StateMachine.lookupStateMachineBySessionId(sessionId2)); |
| 293 | assertNull(StateMachine.lookupStateMachineBySessionId(sessionId3)); |
| 294 | } |
| 295 | |
| 296 | @Test |
| 297 | public void testIdentifierLookups() throws StateMachineException { |
| 298 | String sessionId1 = "session1"; |
| 299 | String sessionId2 = "session2"; |
| 300 | |
| 301 | StateMachine machine1ShouldBeNull = |
| 302 | StateMachine.lookupStateMachineById((byte) 1); |
| 303 | assertNull(machine1ShouldBeNull); |
| 304 | StateMachine machine2ShouldBeNull = |
| 305 | StateMachine.lookupStateMachineById((byte) 2); |
| 306 | assertNull(machine2ShouldBeNull); |
| 307 | |
| 308 | StateMachine stateMachine1 = new StateMachine(sessionId1, null); |
| 309 | stateMachine1.start(); |
| 310 | StateMachine stateMachine2 = new StateMachine(sessionId2, null); |
| 311 | stateMachine2.start(); |
| 312 | |
| 313 | assertEquals(stateMachine1, |
| 314 | StateMachine.lookupStateMachineById(stateMachine1.identifier())); |
| 315 | assertEquals(stateMachine2, |
| 316 | StateMachine.lookupStateMachineById(stateMachine2.identifier())); |
Ari Saha | 79d7c25 | 2015-06-26 10:31:48 -0700 | [diff] [blame] | 317 | } |
| 318 | } |