2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.protocol.rsvp.parser.impl.te;
11 import static org.junit.Assert.assertArrayEquals;
13 import io.netty.buffer.ByteBuf;
14 import io.netty.buffer.Unpooled;
15 import org.junit.Assert;
16 import org.junit.Before;
17 import org.junit.Test;
18 import org.opendaylight.protocol.rsvp.parser.impl.RSVPActivator;
19 import org.opendaylight.protocol.rsvp.parser.impl.subobject.ero.SEROBasicProtectionSubobjectParser;
20 import org.opendaylight.protocol.rsvp.parser.impl.subobject.ero.SERODynamicProtectionSubobjectParser;
21 import org.opendaylight.protocol.rsvp.parser.impl.subobject.rro.SRROBasicProtectionSubobjectParser;
22 import org.opendaylight.protocol.rsvp.parser.impl.subobject.rro.SRRODynamicProtectionSubobjectParser;
23 import org.opendaylight.protocol.rsvp.parser.spi.RSVPParsingException;
24 import org.opendaylight.protocol.rsvp.parser.spi.pojo.SimpleRSVPExtensionProviderContext;
25 import org.opendaylight.protocol.util.ByteArray;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RsvpTeObject;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.explicit.route.subobjects.list.SubobjectContainerBuilder;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.record.route.subobjects.list.SubobjectContainer;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary.explicit.route.object.secondary.explicit.route.object.subobject.container.subobject.type.DynamicControlProtectionCaseBuilder;
31 public class TEObjectTest {
32 private RSVPActivator act;
33 private SimpleRSVPExtensionProviderContext context;
37 this.act = new RSVPActivator();
38 this.context = new SimpleRSVPExtensionProviderContext();
39 this.act.start(this.context);
43 public void testAdminStatusObjectParser() throws RSVPParsingException {
44 final AdminStatusObjectParser admParser = new AdminStatusObjectParser();
45 final RsvpTeObject obj = admParser.parseObject(Unpooled.copiedBuffer(
46 ByteArray.subByte(TEObjectUtil.TE_LSP_ADMIN_STATUS, 4,
47 TEObjectUtil.TE_LSP_ADMIN_STATUS.length - 4)));
48 final ByteBuf output = Unpooled.buffer();
49 admParser.serializeObject(obj, output);
50 assertArrayEquals(TEObjectUtil.TE_LSP_ADMIN_STATUS, ByteArray.getAllBytes(output));
54 public void testAssociationObjectParser1() throws RSVPParsingException {
55 final AssociationObjectParserIPV4 parser = new AssociationObjectParserIPV4();
56 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
57 ByteArray.subByte(TEObjectUtil.TE_LSP_ASSOCIATION_1, 4,
58 TEObjectUtil.TE_LSP_ASSOCIATION_1.length - 4)));
60 final ByteBuf output = Unpooled.buffer();
61 parser.serializeObject(obj, output);
62 assertArrayEquals(TEObjectUtil.TE_LSP_ASSOCIATION_1, ByteArray.getAllBytes(output));
66 public void testAssociationObjectParser2() throws RSVPParsingException {
67 final AssociationObjectParserIPV6 parser = new AssociationObjectParserIPV6();
68 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
69 ByteArray.subByte(TEObjectUtil.TE_LSP_ASSOCIATION_2, 4, TEObjectUtil.TE_LSP_ASSOCIATION_2.length - 4)));
71 final ByteBuf output = Unpooled.buffer();
72 parser.serializeObject(obj, output);
73 assertArrayEquals(TEObjectUtil.TE_LSP_ASSOCIATION_2, ByteArray.getAllBytes(output));
77 public void testBandwidthObjectParser1() throws RSVPParsingException {
78 final BandwidthObjectParser parser = new BandwidthObjectParser();
79 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
80 ByteArray.subByte(TEObjectUtil.TE_LSP_BANDWIDTH_1, 4, TEObjectUtil.TE_LSP_BANDWIDTH_1
83 final ByteBuf output = Unpooled.buffer();
84 parser.serializeObject(obj, output);
85 assertArrayEquals(TEObjectUtil.TE_LSP_BANDWIDTH_1, ByteArray.getAllBytes(output));
89 public void testBandwidthObjectParser2() throws RSVPParsingException {
90 final ReoptimizationBandwidthObjectParser parser = new ReoptimizationBandwidthObjectParser();
91 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
92 ByteArray.subByte(TEObjectUtil.TE_LSP_BANDWIDTH_2, 4, TEObjectUtil.TE_LSP_BANDWIDTH_2
95 final ByteBuf output = Unpooled.buffer();
96 parser.serializeObject(obj, output);
97 assertArrayEquals(TEObjectUtil.TE_LSP_BANDWIDTH_2, ByteArray.getAllBytes(output));
101 public void testExcludeRouteParser() throws RSVPParsingException {
102 final ExcludeRouteObjectParser parser = new ExcludeRouteObjectParser(
103 this.context.getXROSubobjectHandlerRegistry());
104 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
105 ByteArray.subByte(TEObjectUtil.TE_LSP_EXCLUDE_ROUTE, 4,
106 TEObjectUtil.TE_LSP_EXCLUDE_ROUTE.length - 4)));
108 final ByteBuf output = Unpooled.buffer();
109 parser.serializeObject(obj, output);
110 assertArrayEquals(TEObjectUtil.TE_LSP_EXCLUDE_ROUTE, ByteArray.getAllBytes(output));
114 public void testExplicitRouteParser() throws RSVPParsingException {
115 final ExplicitRouteObjectParser parser = new ExplicitRouteObjectParser(
116 this.context.getEROSubobjectHandlerRegistry());
117 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(
118 TEObjectUtil.TE_LSP_EXPLICIT, 4, TEObjectUtil.TE_LSP_EXPLICIT.length - 4)));
120 final ByteBuf output = Unpooled.buffer();
121 parser.serializeObject(obj, output);
122 assertArrayEquals(TEObjectUtil.TE_LSP_EXPLICIT, ByteArray.getAllBytes(output));
126 public void testAttributesObject12Parser() throws RSVPParsingException {
127 final AttributesObjectParser parser = new AttributesObjectParser();
128 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
129 ByteArray.subByte(TEObjectUtil.TE_LSP_ATTRIBUTES, 4,
130 TEObjectUtil.TE_LSP_ATTRIBUTES.length - 4)));
132 final ByteBuf output = Unpooled.buffer();
133 parser.serializeObject(obj, output);
134 assertArrayEquals(TEObjectUtil.TE_LSP_ATTRIBUTES, ByteArray.getAllBytes(output));
138 public void testRequiredAttributesParser() throws RSVPParsingException {
139 final RequiredAttributesObjectParser parser = new RequiredAttributesObjectParser();
140 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
141 ByteArray.subByte(TEObjectUtil.TE_LSP_REQUIRED_ATTRIBUTES, 4,
142 TEObjectUtil.TE_LSP_REQUIRED_ATTRIBUTES.length - 4)));
144 final ByteBuf output = Unpooled.buffer();
145 parser.serializeObject(obj, output);
146 assertArrayEquals(TEObjectUtil.TE_LSP_REQUIRED_ATTRIBUTES, ByteArray.getAllBytes(output));
150 public void testPrimaryPathRouteParser() throws RSVPParsingException {
151 final PrimaryPathRouteObjectParser parser = new PrimaryPathRouteObjectParser(
152 this.context.getEROSubobjectHandlerRegistry());
153 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
154 ByteArray.subByte(TEObjectUtil.TE_LSP_PRIMARY_PATH_ROUTE, 4,
155 TEObjectUtil.TE_LSP_PRIMARY_PATH_ROUTE.length - 4)));
157 final ByteBuf output = Unpooled.buffer();
158 parser.serializeObject(obj, output);
159 assertArrayEquals(TEObjectUtil.TE_LSP_PRIMARY_PATH_ROUTE, ByteArray.getAllBytes(output));
164 public void testProtectionObjectParser1() throws RSVPParsingException {
165 final ProtectionObjectParser parser = new ProtectionObjectParser();
166 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
167 ByteArray.subByte(TEObjectUtil.TE_LSP_PROTECTION_C1, 4,
168 TEObjectUtil.TE_LSP_PROTECTION_C1.length - 4)));
169 final ByteBuf output = Unpooled.buffer();
170 parser.serializeObject(obj, output);
171 assertArrayEquals(TEObjectUtil.TE_LSP_PROTECTION_C1, ByteArray.getAllBytes(output));
175 public void testProtectionObjectParser2() throws RSVPParsingException {
176 final DynamicProtectionObjectParser parser = new DynamicProtectionObjectParser();
177 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
178 ByteArray.subByte(TEObjectUtil.TE_LSP_PROTECTION_C2, 4,
179 TEObjectUtil.TE_LSP_PROTECTION_C2.length - 4)));
180 final ByteBuf output = Unpooled.buffer();
181 parser.serializeObject(obj, output);
182 assertArrayEquals(TEObjectUtil.TE_LSP_PROTECTION_C2, ByteArray.getAllBytes(output));
186 public void testProtectionCommonParser() {
187 final ByteBuf emptyBuff = Unpooled.buffer();
189 ProtectionCommonParser.parseCommonProtectionBodyType2(emptyBuff);
191 } catch (final RSVPParsingException e) {
192 Assert.assertEquals("Wrong length of array of bytes. Passed: " + emptyBuff.readableBytes()
193 + "; Expected: " + ProtectionCommonParser.CONTENT_LENGTH_C2 + ".", e.getMessage());
198 public void testRecordRouteParser() throws RSVPParsingException {
199 final RecordRouteObjectParser parser = new RecordRouteObjectParser(
200 this.context.getRROSubobjectHandlerRegistry());
201 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
202 ByteArray.subByte(TEObjectUtil.TE_LSP_RECORD_ROUTE, 4,
203 TEObjectUtil.TE_LSP_RECORD_ROUTE.length - 4)));
205 final ByteBuf output = Unpooled.buffer();
206 parser.serializeObject(obj, output);
207 assertArrayEquals(TEObjectUtil.TE_LSP_RECORD_ROUTE, ByteArray.getAllBytes(output));
211 public void testSecondaryExplicitRouteParser() throws RSVPParsingException {
212 final SecondaryExplicitRouteObjectParser parser = new SecondaryExplicitRouteObjectParser(
213 this.context.getEROSubobjectHandlerRegistry());
214 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
215 ByteArray.subByte(TEObjectUtil.TE_LSP_SECONDARY_EXPLICIT, 4,
216 TEObjectUtil.TE_LSP_SECONDARY_EXPLICIT.length - 4)));
218 final ByteBuf output = Unpooled.buffer();
219 parser.serializeObject(obj, output);
220 assertArrayEquals(TEObjectUtil.TE_LSP_SECONDARY_EXPLICIT, ByteArray.getAllBytes(output));
224 public void testSecondaryRecordRouteObjectParser() throws RSVPParsingException {
225 final SecondaryRecordRouteObjectParser parser = new SecondaryRecordRouteObjectParser(
226 this.context.getRROSubobjectHandlerRegistry());
227 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
228 ByteArray.subByte(TEObjectUtil.TE_LSP_SECONDARY_RECORD_ROUTE, 4,
229 TEObjectUtil.TE_LSP_SECONDARY_RECORD_ROUTE.length - 4)));
231 final ByteBuf output = Unpooled.buffer();
232 parser.serializeObject(obj, output);
233 assertArrayEquals(TEObjectUtil.TE_LSP_SECONDARY_RECORD_ROUTE, ByteArray.getAllBytes(output));
237 public void testSSRODynamicProtectionSubobjectParser() throws RSVPParsingException {
238 final SRROBasicProtectionSubobjectParser parser = new SRROBasicProtectionSubobjectParser();
239 final SRRODynamicProtectionSubobjectParser dynamicParser = new SRRODynamicProtectionSubobjectParser();
240 final SubobjectContainer sub = parser.parseSubobject(Unpooled.copiedBuffer(
241 ByteArray.subByte(TEObjectUtil.TE_LSP_DYNAMIC_SRRO_PROTECTION, 2,
242 TEObjectUtil.TE_LSP_DYNAMIC_SRRO_PROTECTION.length - 2)));
244 final ByteBuf output = Unpooled.buffer();
245 dynamicParser.serializeSubobject(sub, output);
246 assertArrayEquals(TEObjectUtil.TE_LSP_DYNAMIC_SRRO_PROTECTION, ByteArray.getAllBytes(output));
250 public void testSSROBasicProtectionSubobjectParser() throws RSVPParsingException {
251 final SRROBasicProtectionSubobjectParser parser = new SRROBasicProtectionSubobjectParser();
252 final SubobjectContainer sub = parser.parseSubobject(Unpooled.copiedBuffer(
253 ByteArray.subByte(TEObjectUtil.TE_LSP_BASIC_SRRO_PROTECTION, 2,
254 TEObjectUtil.TE_LSP_BASIC_SRRO_PROTECTION.length - 2)));
256 final ByteBuf output = Unpooled.buffer();
257 parser.serializeSubobject(sub, output);
258 assertArrayEquals(TEObjectUtil.TE_LSP_BASIC_SRRO_PROTECTION, ByteArray.getAllBytes(output));
261 @Test(expected = IllegalArgumentException.class)
262 public void testWrongParseSRRO() throws RSVPParsingException {
263 final SRROBasicProtectionSubobjectParser parser = new SRROBasicProtectionSubobjectParser();
264 parser.parseSubobject(null);
267 @Test(expected = IllegalArgumentException.class)
268 public void testWrongSerializeSRRO() throws RSVPParsingException {
269 final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary.record.route
270 .object.secondary.record.route.object.subobject.container.subobject.type
271 .DynamicControlProtectionCase dynamicProtection = new org.opendaylight.yang.gen.v1.urn
272 .opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary.record.route.object.secondary.record.route
273 .object.subobject.container.subobject.type.DynamicControlProtectionCaseBuilder().build();
274 final SRROBasicProtectionSubobjectParser parser = new SRROBasicProtectionSubobjectParser();
275 final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.record.route.subobjects
276 .list.SubobjectContainer subContainer = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
277 .rsvp.rev150820.record.route.subobjects.list.SubobjectContainerBuilder().setSubobjectType(dynamicProtection)
279 parser.serializeSubobject(subContainer, Unpooled.buffer());
283 public void testSERODynamicProtectionSubobjectParser() throws RSVPParsingException {
284 final SEROBasicProtectionSubobjectParser parser = new SEROBasicProtectionSubobjectParser();
285 final SERODynamicProtectionSubobjectParser dynamicParser = new SERODynamicProtectionSubobjectParser();
286 final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.explicit.route.subobjects
287 .list.SubobjectContainer sub = parser.parseSubobject(Unpooled.copiedBuffer(
288 ByteArray.subByte(TEObjectUtil.TE_LSP_DYNAMIC_SERO_PROTECTION, 2,
289 TEObjectUtil.TE_LSP_DYNAMIC_SERO_PROTECTION.length - 2)), true);
291 final ByteBuf output = Unpooled.buffer();
292 dynamicParser.serializeSubobject(sub, output);
293 assertArrayEquals(TEObjectUtil.TE_LSP_DYNAMIC_SERO_PROTECTION, ByteArray.getAllBytes(output));
296 @Test(expected = IllegalArgumentException.class)
297 public void testWrongParseSERO() throws RSVPParsingException {
298 final SEROBasicProtectionSubobjectParser parser = new SEROBasicProtectionSubobjectParser();
299 parser.parseSubobject(null, false);
302 @Test(expected = IllegalArgumentException.class)
303 public void testWrongSerializeSERO() throws RSVPParsingException {
304 final SEROBasicProtectionSubobjectParser parser = new SEROBasicProtectionSubobjectParser();
305 parser.serializeSubobject(new SubobjectContainerBuilder().setSubobjectType(
306 new DynamicControlProtectionCaseBuilder().build()).build(), Unpooled.buffer());
310 public void testSEROBasicProtectionSubobjectParser() throws RSVPParsingException {
311 final SEROBasicProtectionSubobjectParser parser = new SEROBasicProtectionSubobjectParser();
312 final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.explicit.route.subobjects
313 .list.SubobjectContainer sub = parser.parseSubobject(Unpooled.copiedBuffer(
314 ByteArray.subByte(TEObjectUtil.TE_LSP_BASIC_SERO_PROTECTION, 2,
315 TEObjectUtil.TE_LSP_BASIC_SERO_PROTECTION.length - 2)), true);
317 final ByteBuf output = Unpooled.buffer();
318 parser.serializeSubobject(sub, output);
319 assertArrayEquals(TEObjectUtil.TE_LSP_BASIC_SERO_PROTECTION, ByteArray.getAllBytes(output));
323 public void testDetourObjectParser7() throws RSVPParsingException {
324 final DetourObjectIpv4Parser parser = new DetourObjectIpv4Parser();
325 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
326 ByteArray.subByte(TEObjectUtil.TE_LSP_DETOUR7, 4, TEObjectUtil.TE_LSP_DETOUR7.length - 4)));
328 final ByteBuf output = Unpooled.buffer();
329 parser.serializeObject(obj, output);
330 assertArrayEquals(TEObjectUtil.TE_LSP_DETOUR7, ByteArray.getAllBytes(output));
334 public void testDetourObjectParser8() throws RSVPParsingException {
335 final DetourObjectIpv6Parser parser = new DetourObjectIpv6Parser();
336 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
337 ByteArray.subByte(TEObjectUtil.TE_LSP_DETOUR8, 4, TEObjectUtil.TE_LSP_DETOUR8.length - 4)));
339 final ByteBuf output = Unpooled.buffer();
340 parser.serializeObject(obj, output);
341 assertArrayEquals(TEObjectUtil.TE_LSP_DETOUR8, ByteArray.getAllBytes(output));
345 public void testFastRerouteObjectParser1() throws RSVPParsingException {
346 final FastRerouteObjectParser parser = new FastRerouteObjectParser();
347 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
348 ByteArray.subByte(TEObjectUtil.TE_LSP_FAST_REROUTE1, 4,
349 TEObjectUtil.TE_LSP_FAST_REROUTE1.length - 4)));
351 final ByteBuf output = Unpooled.buffer();
352 parser.serializeObject(obj, output);
353 assertArrayEquals(TEObjectUtil.TE_LSP_FAST_REROUTE1, ByteArray.getAllBytes(output));
357 public void testFastRerouteObjectParser7() throws RSVPParsingException {
358 final InformationalFastRerouteObjectParser parser = new InformationalFastRerouteObjectParser();
359 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
360 ByteArray.subByte(TEObjectUtil.TE_LSP_FAST_REROUTE7, 4,
361 TEObjectUtil.TE_LSP_FAST_REROUTE7.length - 4)));
363 final ByteBuf output = Unpooled.buffer();
364 parser.serializeObject(obj, output);
365 assertArrayEquals(TEObjectUtil.TE_LSP_FAST_REROUTE7, ByteArray.getAllBytes(output));
369 public void testFlowSpecObjectParser_HEAD_5() throws RSVPParsingException {
370 final FlowSpecObjectParser parser = new FlowSpecObjectParser();
371 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
372 ByteArray.subByte(TEObjectUtil.TE_LSP_FLOWSPEC_H5, 4,
373 TEObjectUtil.TE_LSP_FLOWSPEC_H5.length - 4)));
375 final ByteBuf output = Unpooled.buffer();
376 parser.serializeObject(obj, output);
377 assertArrayEquals(TEObjectUtil.TE_LSP_FLOWSPEC_H5, ByteArray.getAllBytes(output));
381 public void testFlowSpecObjectParser_HEAD_2() throws RSVPParsingException {
382 final FlowSpecObjectParser parser = new FlowSpecObjectParser();
383 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
384 ByteArray.subByte(TEObjectUtil.TE_LSP_FLOWSPEC_H2, 4,
385 TEObjectUtil.TE_LSP_FLOWSPEC_H2.length - 4)));
387 final ByteBuf output = Unpooled.buffer();
388 parser.serializeObject(obj, output);
389 assertArrayEquals(TEObjectUtil.TE_LSP_FLOWSPEC_H2, ByteArray.getAllBytes(output));
393 public void testParser_HEAD_5() throws RSVPParsingException {
394 final SenderTspecObjectParser parser = new SenderTspecObjectParser();
395 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
396 ByteArray.subByte(TEObjectUtil.TE_LSP_SENDER_TSPEC, 4,
397 TEObjectUtil.TE_LSP_SENDER_TSPEC.length - 4)));
399 final ByteBuf output = Unpooled.buffer();
400 parser.serializeObject(obj, output);
401 assertArrayEquals(TEObjectUtil.TE_LSP_SENDER_TSPEC, ByteArray.getAllBytes(output));
405 public void testSessionAttributeParser1() throws RSVPParsingException {
406 final SessionAttributeLspRaObjectParser parser = new SessionAttributeLspRaObjectParser();
407 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
408 ByteArray.subByte(TEObjectUtil.TE_LSP_SESSION_C1, 4,
409 TEObjectUtil.TE_LSP_SESSION_C1.length - 4)));
411 final ByteBuf output = Unpooled.buffer();
412 parser.serializeObject(obj, output);
413 assertArrayEquals(TEObjectUtil.TE_LSP_SESSION_C1, ByteArray.getAllBytes(output));
417 public void testSessionAttributeParser7() throws RSVPParsingException {
418 final SessionAttributeLspObjectParser parser = new SessionAttributeLspObjectParser();
419 final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(
420 ByteArray.subByte(TEObjectUtil.TE_LSP_SESSION_C7, 4,
421 TEObjectUtil.TE_LSP_SESSION_C7.length - 4)));
423 final ByteBuf output = Unpooled.buffer();
424 parser.serializeObject(obj, output);
425 assertArrayEquals(TEObjectUtil.TE_LSP_SESSION_C7, ByteArray.getAllBytes(output));