Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014-2015 Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package org.onosproject.pcepio; |
| 17 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 18 | import static org.hamcrest.MatcherAssert.assertThat; |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 19 | import static org.hamcrest.Matchers.instanceOf; |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 20 | import static org.hamcrest.core.Is.is; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 21 | |
| 22 | import org.jboss.netty.buffer.ChannelBuffer; |
| 23 | import org.jboss.netty.buffer.ChannelBuffers; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 24 | import org.junit.Test; |
| 25 | import org.onosproject.pcepio.exceptions.PcepParseException; |
| 26 | import org.onosproject.pcepio.protocol.PcepFactories; |
| 27 | import org.onosproject.pcepio.protocol.PcepMessage; |
| 28 | import org.onosproject.pcepio.protocol.PcepMessageReader; |
| 29 | import org.onosproject.pcepio.protocol.PcepOpenMsg; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 30 | /** |
| 31 | * Test cases for PCEP OPEN Message. |
| 32 | */ |
| 33 | public class PcepOpenMsgTest { |
| 34 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 35 | /** |
| 36 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV, |
| 37 | * PCECC-CAPABILITY-TLV in Pcep Open message. |
| 38 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 39 | @Test |
| 40 | public void openMessageTest1() throws PcepParseException { |
| 41 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 42 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x24, 0x01, 0x10, 0x00, 0x20, 0x20, 0x1e, 0x78, (byte) 0xbd, |
| 43 | 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, //STATEFUL-PCE-CAPABILITY |
| 44 | 0x00, 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, //GMPLS-CAPABILITY-TLV |
| 45 | 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, //PCECC-CAPABILITY-TLV |
| 46 | }; |
| 47 | |
| 48 | byte[] testOpenMsg = {0}; |
| 49 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 50 | buffer.writeBytes(openMsg); |
| 51 | |
| 52 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 53 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 54 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 55 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 56 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 57 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 58 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 59 | message.writeTo(buf); |
| 60 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 61 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 62 | int readLen = buf.writerIndex() - 0; |
| 63 | testOpenMsg = new byte[readLen]; |
| 64 | buf.readBytes(testOpenMsg, 0, readLen); |
| 65 | |
| 66 | assertThat(testOpenMsg, is(openMsg)); |
| 67 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 68 | } |
| 69 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 70 | /** |
| 71 | * This test case checks open object with STATEFUL-PCE-CAPABILITY-TLV in Pcep Open message. |
| 72 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 73 | @Test |
| 74 | public void openMessageTest2() throws PcepParseException { |
| 75 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 76 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x14, // common header |
| 77 | 0x01, 0x10, 0x00, 0x10, // common object header |
| 78 | 0x20, 0x1E, 0x78, 0x01, // OPEN object |
| 79 | 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f}; // STATEFUL-PCE-CAPABILITY |
| 80 | byte[] testOpenMsg = {0}; |
| 81 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 82 | buffer.writeBytes(openMsg); |
| 83 | |
| 84 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 85 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 86 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 87 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 88 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 89 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 90 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 91 | message.writeTo(buf); |
| 92 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 93 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 94 | int readLen = buf.writerIndex() - 0; |
| 95 | testOpenMsg = new byte[readLen]; |
| 96 | buf.readBytes(testOpenMsg, 0, readLen); |
| 97 | |
| 98 | assertThat(testOpenMsg, is(openMsg)); |
| 99 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 100 | } |
| 101 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 102 | /** |
| 103 | * This test case checks open object with GmplsCapability tlv in Pcep Open message. |
| 104 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 105 | @Test |
| 106 | public void openMessageTest3() throws PcepParseException { |
| 107 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 108 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x14, // common header |
| 109 | 0x01, 0x10, 0x00, 0x10, // common object header |
| 110 | 0x20, 0x1E, 0x78, 0x01, // OPEN object |
| 111 | 0x00, 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00}; //GMPLS-CAPABILITY-TLV |
| 112 | |
| 113 | byte[] testOpenMsg = {0}; |
| 114 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 115 | buffer.writeBytes(openMsg); |
| 116 | |
| 117 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 118 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 119 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 120 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 121 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 122 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 123 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 124 | message.writeTo(buf); |
| 125 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 126 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 127 | int readLen = buf.writerIndex() - 0; |
| 128 | testOpenMsg = new byte[readLen]; |
| 129 | buf.readBytes(testOpenMsg, 0, readLen); |
| 130 | |
| 131 | |
| 132 | assertThat(testOpenMsg, is(openMsg)); |
| 133 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 134 | } |
| 135 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 136 | /** |
| 137 | * This test case checks open object with StatefulLspDbVer Tlv in Pcep Open message. |
| 138 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 139 | @Test |
| 140 | public void openMessageTest4() throws PcepParseException { |
| 141 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 142 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x18, |
| 143 | 0x01, 0x10, 0x00, 0x14, 0x20, 0x1e, 0x78, 0x20, |
| 144 | 0x00, 0x17, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }; //StatefulLspDbVerTlv |
| 145 | |
| 146 | byte[] testOpenMsg = {0}; |
| 147 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 148 | buffer.writeBytes(openMsg); |
| 149 | |
| 150 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 151 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 152 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 153 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 154 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 155 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 156 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 157 | message.writeTo(buf); |
| 158 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 159 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 160 | int readLen = buf.writerIndex() - 0; |
| 161 | testOpenMsg = new byte[readLen]; |
| 162 | buf.readBytes(testOpenMsg, 0, readLen); |
| 163 | |
| 164 | assertThat(testOpenMsg, is(openMsg)); |
| 165 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 166 | } |
| 167 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 168 | /** |
| 169 | * This test case checks open object with no tlv's in Pcep Open message. |
| 170 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 171 | @Test |
| 172 | public void openMessageTest5() throws PcepParseException { |
| 173 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 174 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x0C, |
| 175 | 0x01, 0x10, 0x00, 0x08, 0x20, 0x1e, 0x78, (byte) 0xbd }; // no Tlvs in open messsage |
| 176 | |
| 177 | byte[] testOpenMsg = {0}; |
| 178 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 179 | buffer.writeBytes(openMsg); |
| 180 | |
| 181 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 182 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 183 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 184 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 185 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 186 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 187 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 188 | message.writeTo(buf); |
| 189 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 190 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 191 | int readLen = buf.writerIndex() - 0; |
| 192 | testOpenMsg = new byte[readLen]; |
| 193 | buf.readBytes(testOpenMsg, 0, readLen); |
| 194 | |
| 195 | assertThat(testOpenMsg, is(openMsg)); |
| 196 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 197 | } |
| 198 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 199 | /** |
| 200 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV, PCECC-CAPABILITY-TLV |
| 201 | * with I bit set in Pcep Open message. |
| 202 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 203 | @Test |
| 204 | public void openMessageTest6() throws PcepParseException { |
| 205 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 206 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x24, 0x01, 0x11, 0x00, 0x20, //p bit not set & i bit set |
| 207 | 0x20, 0x1e, 0x78, (byte) 0xbd, |
| 208 | 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, // STATEFUL-PCE-CAPABILITY |
| 209 | 0x00, 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, //GMPLS-CAPABILITY-TLV |
| 210 | 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, //PCECC-CAPABILITY-TLV |
| 211 | }; |
| 212 | |
| 213 | byte[] testOpenMsg = {0}; |
| 214 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 215 | buffer.writeBytes(openMsg); |
| 216 | |
| 217 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 218 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 219 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 220 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 221 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 222 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 223 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 224 | message.writeTo(buf); |
| 225 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 226 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 227 | int readLen = buf.writerIndex() - 0; |
| 228 | testOpenMsg = new byte[readLen]; |
| 229 | buf.readBytes(testOpenMsg, 0, readLen); |
| 230 | |
| 231 | assertThat(testOpenMsg, is(openMsg)); |
| 232 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 233 | } |
| 234 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 235 | /** |
| 236 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV, PCECC-CAPABILITY-TLV |
| 237 | * with P bit set in Pcep Open message. |
| 238 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 239 | @Test |
| 240 | public void openMessageTest7() throws PcepParseException { |
| 241 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 242 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x24, 0x01, 0x12, 0x00, 0x20, //p bit set & i bit not set |
| 243 | 0x20, 0x1e, 0x78, (byte) 0xbd, |
| 244 | 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, //STATEFUL-PCE-CAPABILITY |
| 245 | 0x00, 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, //GMPLS-CAPABILITY-TLV |
| 246 | 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, //PCECC-CAPABILITY-TLV |
| 247 | }; |
| 248 | |
| 249 | byte[] testOpenMsg = {0}; |
| 250 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 251 | buffer.writeBytes(openMsg); |
| 252 | |
| 253 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 254 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 255 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 256 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 257 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 258 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 259 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 260 | message.writeTo(buf); |
| 261 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 262 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 263 | int readLen = buf.writerIndex() - 0; |
| 264 | testOpenMsg = new byte[readLen]; |
| 265 | buf.readBytes(testOpenMsg, 0, readLen); |
| 266 | |
| 267 | assertThat(testOpenMsg, is(openMsg)); |
| 268 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 269 | } |
| 270 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 271 | /** |
| 272 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV, PCECC-CAPABILITY-TLV |
| 273 | * with P & I bits set in Pcep Open message. |
| 274 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 275 | @Test |
| 276 | public void openMessageTest8() throws PcepParseException { |
| 277 | |
| 278 | /* OPEN OBJECT (STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV, PCECC-CAPABILITY-TLV) |
| 279 | with p bit set & i bit set. |
| 280 | */ |
| 281 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x24, 0x01, 0x13, 0x00, 0x20, //p bit set & i bit set |
| 282 | 0x20, 0x1e, 0x78, (byte) 0xbd, |
| 283 | 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, //STATEFUL-PCE-CAPABILITY |
| 284 | 0x00, 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, //GMPLS-CAPABILITY-TLV |
| 285 | 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, //PCECC-CAPABILITY-TLV |
| 286 | }; |
| 287 | |
| 288 | byte[] testOpenMsg = {0}; |
| 289 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 290 | buffer.writeBytes(openMsg); |
| 291 | |
| 292 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 293 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 294 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 295 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 296 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 297 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 298 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 299 | message.writeTo(buf); |
| 300 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 301 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 302 | int readLen = buf.writerIndex() - 0; |
| 303 | testOpenMsg = new byte[readLen]; |
| 304 | buf.readBytes(testOpenMsg, 0, readLen); |
| 305 | |
| 306 | assertThat(testOpenMsg, is(openMsg)); |
| 307 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 308 | } |
| 309 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 310 | /** |
| 311 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV, PCECC-CAPABILITY-TLV |
| 312 | * with P & I bits set and invalid session id in Pcep Open message. |
| 313 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 314 | @Test |
| 315 | public void openMessageTest9() throws PcepParseException { |
| 316 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 317 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x24, 0x01, 0x13, 0x00, 0x20, //p bit set & i bit set |
| 318 | 0x20, 0x1e, 0x78, 0x00, //invalid sessionID |
| 319 | 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, //STATEFUL-PCE-CAPABILITY |
| 320 | 0x00, 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, //GMPLS-CAPABILITY-TLV |
| 321 | 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, //PCECC-CAPABILITY-TLV |
| 322 | }; |
| 323 | |
| 324 | byte[] testOpenMsg = {0}; |
| 325 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 326 | buffer.writeBytes(openMsg); |
| 327 | |
| 328 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 329 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 330 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 331 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 332 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 333 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 334 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 335 | message.writeTo(buf); |
| 336 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 337 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 338 | int readLen = buf.writerIndex() - 0; |
| 339 | testOpenMsg = new byte[readLen]; |
| 340 | buf.readBytes(testOpenMsg, 0, readLen); |
| 341 | |
| 342 | |
| 343 | assertThat(testOpenMsg, is(openMsg)); |
| 344 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 345 | } |
| 346 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 347 | /** |
| 348 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV |
| 349 | * in Pcep Open message. |
| 350 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 351 | @Test |
| 352 | public void openMessageTest10() throws PcepParseException { |
| 353 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 354 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x1C, // common header |
| 355 | 0x01, 0x10, 0x00, 0x18, // common object header |
| 356 | 0x20, 0x05, 0x1E, 0x01, // OPEN object |
| 357 | 0x00, 0x10, 0x00, 0x04, // STATEFUL-PCE-CAPABILITY |
| 358 | 0x00, 0x00, 0x00, 0x05, |
| 359 | 0x00, 0x0E, 0x00, 0x04, // GMPLS-CAPABILITY-TLV |
| 360 | 0x00, 0x00, 0x00, 0x00}; |
| 361 | |
| 362 | byte[] testOpenMsg = {0}; |
| 363 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 364 | buffer.writeBytes(openMsg); |
| 365 | |
| 366 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 367 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 368 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 369 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 370 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 371 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 372 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 373 | message.writeTo(buf); |
| 374 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 375 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 376 | int readLen = buf.writerIndex() - 0; |
| 377 | testOpenMsg = new byte[readLen]; |
| 378 | buf.readBytes(testOpenMsg, 0, readLen); |
| 379 | |
| 380 | assertThat(testOpenMsg, is(openMsg)); |
| 381 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 382 | } |
| 383 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 384 | /** |
| 385 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV, |
| 386 | * PCECC-CAPABILITY-TLV, TED Capability TLV in Pcep Open message. |
| 387 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 388 | @Test |
| 389 | public void openMessageTest11() throws PcepParseException { |
| 390 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 391 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x2C, // common header |
| 392 | 0x01, 0x10, 0x00, 0x28, // common object header |
| 393 | 0x20, 0x05, 0x1E, 0x01, // OPEN object |
| 394 | 0x00, 0x10, 0x00, 0x04, // STATEFUL-PCE-CAPABILITY |
| 395 | 0x00, 0x00, 0x00, 0x05, 0x00, 0x0E, 0x00, 0x04, // GMPLS-CAPABILITY-TLV |
| 396 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // PCECC-CAPABILITY-TLV |
| 397 | 0x00, 0x00, 0x00, 0x03, 0x00, (byte) 0x84, 0x00, 0x04, // TED Capability TLV |
| 398 | 0x00, 0x00, 0x00, 0x00 }; |
| 399 | |
| 400 | byte[] testOpenMsg = {0}; |
| 401 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 402 | buffer.writeBytes(openMsg); |
| 403 | |
| 404 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 405 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 406 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 407 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 408 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 409 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 410 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 411 | message.writeTo(buf); |
| 412 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 413 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 414 | int readLen = buf.writerIndex() - 0; |
| 415 | testOpenMsg = new byte[readLen]; |
| 416 | buf.readBytes(testOpenMsg, 0, readLen); |
| 417 | |
| 418 | assertThat(testOpenMsg, is(openMsg)); |
| 419 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 420 | } |
| 421 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 422 | /** |
| 423 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV, |
| 424 | * PCECC-CAPABILITY-TLV in Pcep Open message. |
| 425 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 426 | @Test |
| 427 | public void openMessageTest12() throws PcepParseException { |
| 428 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 429 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x24, // common header |
| 430 | 0x01, 0x10, 0x00, 0x20, // common object header |
| 431 | 0x20, 0x05, 0x1E, 0x01, // OPEN object |
| 432 | 0x00, 0x10, 0x00, 0x04, // STATEFUL-PCE-CAPABILITY |
| 433 | 0x00, 0x00, 0x00, 0x05, 0x00, 0x0E, 0x00, 0x04, // GMPLS-CAPABILITY-TLV |
| 434 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // PCECC-CAPABILITY-TLV |
| 435 | 0x00, 0x00, 0x00, 0x03}; |
| 436 | |
| 437 | byte[] testOpenMsg = {0}; |
| 438 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 439 | buffer.writeBytes(openMsg); |
| 440 | |
| 441 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 442 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 443 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 444 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 445 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 446 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 447 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 448 | message.writeTo(buf); |
| 449 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 450 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 451 | int readLen = buf.writerIndex() - 0; |
| 452 | testOpenMsg = new byte[readLen]; |
| 453 | buf.readBytes(testOpenMsg, 0, readLen); |
| 454 | |
| 455 | assertThat(testOpenMsg, is(openMsg)); |
| 456 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 457 | } |
| 458 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 459 | /** |
| 460 | * This test case checks open object with STATEFUL-PCE-CAPABILITY, GMPLS-CAPABILITY-TLV |
| 461 | * in Pcep Open message. |
| 462 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 463 | @Test |
| 464 | public void openMessageTest13() throws PcepParseException { |
| 465 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 466 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x1c, // common header |
| 467 | 0x01, 0x10, 0x00, 0x18, // common object header |
| 468 | 0x20, 0x05, 0x1E, 0x01, // OPEN object |
| 469 | 0x00, 0x10, 0x00, 0x04, // STATEFUL-PCE-CAPABILITY |
| 470 | 0x00, 0x00, 0x00, 0x05, 0x00, 0x0E, 0x00, 0x04, // GMPLS-CAPABILITY-TLV |
| 471 | 0x00, 0x00, 0x00, 0x00}; |
| 472 | |
| 473 | byte[] testOpenMsg = {0}; |
| 474 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 475 | buffer.writeBytes(openMsg); |
| 476 | |
| 477 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 478 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 479 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 480 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 481 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 482 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 483 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 484 | message.writeTo(buf); |
| 485 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 486 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 487 | int readLen = buf.writerIndex() - 0; |
| 488 | testOpenMsg = new byte[readLen]; |
| 489 | buf.readBytes(testOpenMsg, 0, readLen); |
| 490 | |
| 491 | |
| 492 | assertThat(testOpenMsg, is(openMsg)); |
| 493 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 494 | } |
| 495 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 496 | /** |
| 497 | * This test case checks open object with STATEFUL-PCE-CAPABILITY in Pcep Open message. |
| 498 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 499 | @Test |
| 500 | public void openMessageTest14() throws PcepParseException { |
| 501 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 502 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x14, // common header |
| 503 | 0x01, 0x10, 0x00, 0x10, // common object header |
| 504 | 0x20, 0x05, 0x1E, 0x01, // OPEN object |
| 505 | 0x00, 0x10, 0x00, 0x04, // STATEFUL-PCE-CAPABILITY |
| 506 | 0x00, 0x00, 0x00, 0x05}; |
| 507 | |
| 508 | byte[] testOpenMsg = {0}; |
| 509 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 510 | buffer.writeBytes(openMsg); |
| 511 | |
| 512 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 513 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 514 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 515 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 516 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 517 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 518 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 519 | message.writeTo(buf); |
| 520 | testOpenMsg = buf.array(); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 521 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 522 | int readLen = buf.writerIndex() - 0; |
| 523 | testOpenMsg = new byte[readLen]; |
| 524 | buf.readBytes(testOpenMsg, 0, readLen); |
| 525 | |
| 526 | assertThat(testOpenMsg, is(openMsg)); |
| 527 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 528 | } |
| 529 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 530 | /** |
| 531 | * This test case checks open object with no tlv Pcep Open message. |
| 532 | */ |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 533 | @Test |
| 534 | public void openMessageTest15() throws PcepParseException { |
| 535 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 536 | byte[] openMsg = new byte[] {0x20, 0x01, 0x00, 0x0c, // common header |
| 537 | 0x01, 0x10, 0x00, 0x08, // common object header |
| 538 | 0x20, 0x05, 0x1E, 0x01 // OPEN object |
| 539 | }; |
| 540 | |
| 541 | byte[] testOpenMsg = {0}; |
| 542 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| 543 | buffer.writeBytes(openMsg); |
| 544 | |
| 545 | PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); |
| 546 | PcepMessage message = null; |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 547 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 548 | message = reader.readFrom(buffer); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 549 | |
Sho SHIMIZU | e090a42 | 2015-09-04 17:35:49 -0700 | [diff] [blame^] | 550 | assertThat(message, instanceOf(PcepOpenMsg.class)); |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 551 | |
SureshBR | 3dab097 | 2015-08-24 18:38:09 +0530 | [diff] [blame] | 552 | ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); |
| 553 | message.writeTo(buf); |
| 554 | testOpenMsg = buf.array(); |
| 555 | |
| 556 | int readLen = buf.writerIndex() - 0; |
| 557 | testOpenMsg = new byte[readLen]; |
| 558 | buf.readBytes(testOpenMsg, 0, readLen); |
| 559 | assertThat(testOpenMsg, is(openMsg)); |
| 560 | |
Mahesh Poojary S | 1c356e3 | 2015-08-21 15:05:30 +0530 | [diff] [blame] | 561 | } |
| 562 | } |