591276b04588631defb45a1a497872a3c20ce17e
[dcaegen2/services/prh.git] /
1 /*
2  * ============LICENSE_START=======================================================
3  * PNF-REGISTRATION-HANDLER
4  * ================================================================================
5  * Copyright (C) 2018 NOKIA Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.dcaegen2.services.prh.service;
22
23 import static org.mockito.Mockito.spy;
24
25 import com.google.gson.JsonElement;
26 import com.google.gson.JsonParser;
27 import java.util.Optional;
28 import org.junit.jupiter.api.Assertions;
29 import org.junit.jupiter.api.Test;
30 import org.mockito.Mockito;
31 import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
32 import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
33 import reactor.core.publisher.Mono;
34 import reactor.test.StepVerifier;
35
36 /**
37  * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 5/8/18
38  */
39 class DmaapConsumerJsonParserTest {
40
41     @Test
42     void whenPassingCorrectJson_validationNotThrowingAnException() {
43         //given
44         String message = "[{\"event\": {"
45                 + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
46                 + "\"pnfRegistrationFields\": {"
47                 + " \"equip-vendor\": \"nokia\","
48                 + " \"serial-number\": \"QTFCOC540002E\","
49                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
50                 + " \"equip-model\": \"3310\","
51                 + " \"equip-type\": \"type\",\n"
52                 + " \"nf-role\": \"role\","
53                 + " \"oamV4IpAddress\": \"10.16.123.234\","
54                 + " \"sw-version\": \"v4.5.0.1\","
55                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
56                 + "}}}]";
57
58         String parsed = "{\"event\": {"
59                 + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
60                 + "\"pnfRegistrationFields\": {"
61                 + " \"equip-vendor\": \"nokia\","
62                 + " \"serial-number\": \"QTFCOC540002E\","
63                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
64                 + " \"equip-model\": \"3310\","
65                 + " \"equip-type\": \"type\",\n"
66                 + " \"nf-role\": \"role\","
67                 + " \"unitFamily\": \"BBU\","
68                 + " \"oamV4IpAddress\": \"10.16.123.234\","
69                 + " \"sw-version\": \"v4.5.0.1\","
70                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
71                 + "}}}";
72
73         ConsumerDmaapModel expectedObject = ImmutableConsumerDmaapModel.builder()
74                 .ipv4("10.16.123.234")
75                 .ipv6("0:0:0:0:0:FFFF:0A10:7BEA")
76                 .correlationId("NOKQTFCOC540002E")
77                 .serialNumber("QTFCOC540002E")
78                 .equipVendor("nokia")
79                 .equipModel("3310")
80                 .equipType("type")
81                 .nfRole("role")
82                 .swVersion("v4.5.0.1")
83                 .build();
84         //when
85         DmaapConsumerJsonParser dmaapConsumerJsonParser = spy(new DmaapConsumerJsonParser());
86         JsonElement jsonElement = new JsonParser().parse(parsed);
87         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject()))
88             .when(dmaapConsumerJsonParser).getJsonObjectFromAnArray(jsonElement);
89         ConsumerDmaapModel consumerDmaapModel = dmaapConsumerJsonParser
90             .getJsonObject(Mono.just((message))).blockFirst();
91         //then
92         Assertions.assertNotNull(consumerDmaapModel);
93         Assertions.assertEquals(expectedObject, consumerDmaapModel);
94     }
95
96     @Test
97     void whenPassingCorrectJsonWithoutIpv4_validationNotThrowingAnException() {
98         //given
99         String message = "[{\"event\": {"
100                 + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
101                 + "\"pnfRegistrationFields\": {"
102                 + " \"equip-vendor\": \"nokia\","
103                 + " \"serial-number\": \"QTFCOC540002E\","
104                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
105                 + " \"equip-model\": \"3310\","
106                 + " \"equip-type\": \"type\",\n"
107                 + " \"nf-role\": \"role\","
108                 + " \"unitFamily\": \"BBU\","
109                 + " \"sw-version\": \"v4.5.0.1\","
110                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
111                 + "}}}]";
112
113         String parsed = "{\"event\": {"
114                 + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
115                 + "\"pnfRegistrationFields\": {"
116                 + " \"equip-vendor\": \"nokia\","
117                 + " \"serial-number\": \"QTFCOC540002E\","
118                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
119                 + " \"equip-model\": \"3310\","
120                 + " \"equip-type\": \"type\",\n"
121                 + " \"nf-role\": \"role\","
122                 + " \"unitFamily\": \"BBU\","
123                 + " \"sw-version\": \"v4.5.0.1\","
124                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
125                 + "}}}";
126
127         //when
128         DmaapConsumerJsonParser dmaapConsumerJsonParser = spy(new DmaapConsumerJsonParser());
129         JsonElement jsonElement = new JsonParser().parse(parsed);
130         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject()))
131             .when(dmaapConsumerJsonParser).getJsonObjectFromAnArray(jsonElement);
132         dmaapConsumerJsonParser.getJsonObject(Mono.just((message)));
133         ConsumerDmaapModel consumerDmaapModel = dmaapConsumerJsonParser.getJsonObject(Mono.just((message)))
134             .blockFirst();
135         //then
136         ConsumerDmaapModel expectedObject = ImmutableConsumerDmaapModel.builder()
137                 .ipv4("")
138                 .ipv6("0:0:0:0:0:FFFF:0A10:7BEA")
139                 .correlationId("NOKQTFCOC540002E")
140                 .serialNumber("QTFCOC540002E")
141                 .equipVendor("nokia")
142                 .equipModel("3310")
143                 .equipType("type")
144                 .nfRole("role")
145                 .swVersion("v4.5.0.1")
146                 .build();
147         Assertions.assertNotNull(consumerDmaapModel);
148         Assertions.assertEquals(expectedObject, consumerDmaapModel);
149     }
150
151     @Test
152     void whenPassingCorrectJsonWithoutIpv6_validationNotThrowingAnException() {
153         //given
154         String message = "[{\"event\": {"
155                 + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
156                 + "\"pnfRegistrationFields\": {"
157                 + " \"equip-vendor\": \"nokia\","
158                 + " \"serial-number\": \"QTFCOC540002E\","
159                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
160                 + " \"equip-model\": \"3310\","
161                 + " \"equip-type\": \"type\",\n"
162                 + " \"nf-role\": \"role\","
163                 + " \"unitFamily\": \"BBU\","
164                 + " \"oamV4IpAddress\": \"10.16.123.234\","
165                 + " \"sw-version\": \"v4.5.0.1\""
166                 + "}}}]";
167
168         String parsed = "{\"event\": {"
169                 + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
170                 + "\"pnfRegistrationFields\": {"
171                 + " \"equip-vendor\": \"nokia\","
172                 + " \"serial-number\": \"QTFCOC540002E\","
173                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
174                 + " \"equip-model\": \"3310\","
175                 + " \"equip-type\": \"type\",\n"
176                 + " \"nf-role\": \"role\","
177                 + " \"unitFamily\": \"BBU\","
178                 + " \"oamV4IpAddress\": \"10.16.123.234\","
179                 + " \"sw-version\": \"v4.5.0.1\""
180                 + "}}}";
181
182         ConsumerDmaapModel expectedObject = ImmutableConsumerDmaapModel.builder()
183                 .ipv4("10.16.123.234")
184                 .ipv6("")
185                 .correlationId("NOKQTFCOC540002E")
186                 .serialNumber("QTFCOC540002E")
187                 .equipVendor("nokia")
188                 .equipModel("3310")
189                 .equipType("type")
190                 .nfRole("role")
191                 .swVersion("v4.5.0.1")
192                 .build();
193         //when
194         DmaapConsumerJsonParser dmaapConsumerJsonParser = spy(new DmaapConsumerJsonParser());
195         JsonElement jsonElement = new JsonParser().parse(parsed);
196         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject()))
197             .when(dmaapConsumerJsonParser).getJsonObjectFromAnArray(jsonElement);
198         ConsumerDmaapModel consumerDmaapModel = dmaapConsumerJsonParser.getJsonObject(Mono.just((message)))
199             .blockFirst();
200         //then
201         Assertions.assertNotNull(consumerDmaapModel);
202         Assertions.assertEquals(expectedObject, consumerDmaapModel);
203     }
204
205     @Test
206     void whenPassingCorrectJsonWithoutIpv4andIpv6_validationAddingAnException() {
207         //given
208         String message = "[{\"event\": {"
209             + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
210             + "\"pnfRegistrationFields\": {"
211             + " \"unitType\": \"AirScale\","
212             + " \"serialNumber\": \"QTFCOC540002E\","
213             + " \"pnfRegistrationFieldsVersion\": \"2.0\","
214             + " \"manufactureDate\": \"1535014037024\","
215             + " \"modelNumber\": \"7BEA\",\n"
216             + " \"lastServiceDate\": \"1535014037024\","
217             + " \"unitFamily\": \"BBU\","
218             + " \"vendorName\": \"Nokia\","
219             + " \"softwareVersion\": \"v4.5.0.1\""
220             + "}}}]";
221
222         String parsed = "{\"event\": {"
223             + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
224             + "\"pnfRegistrationFields\": {"
225             + " \"unitType\": \"AirScale\","
226             + " \"serialNumber\": \"QTFCOC540002E\","
227             + " \"pnfRegistrationFieldsVersion\": \"2.0\","
228             + " \"manufactureDate\": \"1535014037024\","
229             + " \"modelNumber\": \"7BEA\",\n"
230             + " \"lastServiceDate\": \"1535014037024\","
231             + " \"unitFamily\": \"BBU\","
232             + " \"vendorName\": \"Nokia\","
233             + " \"softwareVersion\": \"v4.5.0.1\""
234             + "}}}";
235
236         DmaapConsumerJsonParser dmaapConsumerJsonParser = spy(new DmaapConsumerJsonParser());
237         JsonElement jsonElement = new JsonParser().parse(parsed);
238         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject()))
239             .when(dmaapConsumerJsonParser).getJsonObjectFromAnArray(jsonElement);
240         StepVerifier.create(dmaapConsumerJsonParser.getJsonObject(Mono.just(message)))
241             .expectSubscription().thenRequest(1).verifyComplete();
242
243     }
244
245     @Test
246     void whenPassingJsonWithoutMandatoryHeaderInformation_validationAddingAnException() {
247         String parsed = "{\"event\": {"
248             + "\"commonEventHeader\": {},"
249             + "\"pnfRegistrationFields\": {"
250             + " \"unitType\": \"AirScale\","
251             + " \"serialNumber\": \"QTFCOC540002E\","
252             + " \"pnfRegistrationFieldsVersion\": \"2.0\","
253             + " \"manufactureDate\": \"1535014037024\","
254             + " \"modelNumber\": \"7BEA\",\n"
255             + " \"lastServiceDate\": \"1535014037024\","
256             + " \"unitFamily\": \"BBU\","
257             + " \"vendorName\": \"Nokia\","
258             + " \"softwareVersion\": \"v4.5.0.1\""
259             + "}}}";
260
261         DmaapConsumerJsonParser dmaapConsumerJsonParser = spy(new DmaapConsumerJsonParser());
262         JsonElement jsonElement = new JsonParser().parse(parsed);
263         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject()))
264             .when(dmaapConsumerJsonParser).getJsonObjectFromAnArray(jsonElement);
265         String incorrectMessage = "[{\"event\": {"
266             + "\"commonEventHeader\": {},"
267             + "\"pnfRegistrationFields\": {"
268             + " \"unitType\": \"AirScale\","
269             + " \"serialNumber\": \"QTFCOC540002E\","
270             + " \"pnfRegistrationFieldsVersion\": \"2.0\","
271             + " \"manufactureDate\": \"1535014037024\","
272             + " \"modelNumber\": \"7BEA\",\n"
273             + " \"lastServiceDate\": \"1535014037024\","
274             + " \"unitFamily\": \"BBU\","
275             + " \"vendorName\": \"Nokia\","
276             + " \"softwareVersion\": \"v4.5.0.1\""
277             + "}}}]";
278         StepVerifier.create(dmaapConsumerJsonParser.getJsonObject(Mono.just(incorrectMessage)))
279             .expectSubscription().thenRequest(1).verifyComplete();
280     }
281
282     @Test
283     void whenPassingJsonWithoutSourceName_validationAddingAnException() {
284         String parsed = "{\"event\": {"
285             + "\"commonEventHeader\": {},"
286             + "\"pnfRegistrationFields\": {"
287             + " \"unitType\": \"AirScale\","
288             + " \"serialNumber\": \"QTFCOC540002E\","
289             + " \"pnfRegistrationFieldsVersion\": \"2.0\","
290             + " \"manufactureDate\": \"1535014037024\","
291             + " \"modelNumber\": \"7BEA\",\n"
292             + " \"lastServiceDate\": \"1535014037024\","
293             + " \"unitFamily\": \"BBU\","
294             + " \"vendorName\": \"Nokia\","
295             + " \"softwareVersion\": \"v4.5.0.1\","
296             + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
297             + "}}}";
298
299         DmaapConsumerJsonParser dmaapConsumerJsonParser = spy(new DmaapConsumerJsonParser());
300         JsonElement jsonElement = new JsonParser().parse(parsed);
301         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject()))
302             .when(dmaapConsumerJsonParser).getJsonObjectFromAnArray(jsonElement);
303         String jsonWithoutSourceName =
304             "[{\"event\": {"
305                 + "\"commonEventHeader\": {},"
306                 + "\"pnfRegistrationFields\": {"
307                 + " \"unitType\": \"AirScale\","
308                 + " \"serialNumber\": \"QTFCOC540002E\","
309                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
310                 + " \"manufactureDate\": \"1535014037024\","
311                 + " \"modelNumber\": \"7BEA\",\n"
312                 + " \"lastServiceDate\": \"1535014037024\","
313                 + " \"unitFamily\": \"BBU\","
314                 + " \"vendorName\": \"Nokia\","
315                 + " \"softwareVersion\": \"v4.5.0.1\","
316                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
317                 + "}}}]";
318         StepVerifier
319             .create(dmaapConsumerJsonParser.getJsonObject(Mono.just(jsonWithoutSourceName)))
320             .expectSubscription().thenRequest(1)
321             .verifyComplete();
322     }
323
324     @Test
325     void whenPassingJsonWithoutIpInformation_validationAddingAnException() {
326         String parsed =
327             "{\"event\": {"
328                 + "\"commonEventHeader\": {\"sourceName\": \"NOKQTFCOC540002E\"},"
329                 + "\"pnfRegistrationFields\": {"
330                 + " \"unitType\": \"AirScale\","
331                 + " \"serialNumber\": \"QTFCOC540002E\","
332                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
333                 + " \"manufactureDate\": \"1535014037024\","
334                 + " \"modelNumber\": \"7BEA\",\n"
335                 + " \"lastServiceDate\": \"1535014037024\","
336                 + " \"unitFamily\": \"BBU\","
337                 + " \"vendorName\": \"Nokia\","
338                 + " \"softwareVersion\": \"v4.5.0.1\","
339                 + " \"oamV4IpAddress\": \"\","
340                 + " \"oamV6IpAddress\": \"\""
341                 + "}}}";
342
343         DmaapConsumerJsonParser dmaapConsumerJsonParser = spy(new DmaapConsumerJsonParser());
344         JsonElement jsonElement = new JsonParser().parse(parsed);
345         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject()))
346             .when(dmaapConsumerJsonParser).getJsonObjectFromAnArray(jsonElement);
347         String jsonWithoutIpInformation =
348             "[{\"event\": {"
349                 + "\"commonEventHeader\": {\"sourceName\": \"NOKQTFCOC540002E\"},"
350                 + "\"pnfRegistrationFields\": {"
351                 + " \"unitType\": \"AirScale\","
352                 + " \"serialNumber\": \"QTFCOC540002E\","
353                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
354                 + " \"manufactureDate\": \"1535014037024\","
355                 + " \"modelNumber\": \"7BEA\",\n"
356                 + " \"lastServiceDate\": \"1535014037024\","
357                 + " \"unitFamily\": \"BBU\","
358                 + " \"vendorName\": \"Nokia\","
359                 + " \"softwareVersion\": \"v4.5.0.1\","
360                 + " \"oamV4IpAddress\": \"\","
361                 + " \"oamV6IpAddress\": \"\""
362                 + "}}}]";
363         StepVerifier.create(dmaapConsumerJsonParser.getJsonObject(Mono.just(jsonWithoutIpInformation)))
364             .expectSubscription().thenRequest(1).verifyComplete();
365     }
366
367     @Test
368     void whenPassingJsonWithoutSourceNameValue_validationAddingAnException() {
369         String parsed =
370             "{\"event\": {"
371                 + "\"commonEventHeader\": {\"sourceName\": \"\"},"
372                 + "\"pnfRegistrationFields\": {"
373                 + " \"unitType\": \"AirScale\","
374                 + " \"serialNumber\": \"QTFCOC540002E\","
375                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
376                 + " \"manufactureDate\": \"1535014037024\","
377                 + " \"modelNumber\": \"7BEA\",\n"
378                 + " \"lastServiceDate\": \"1535014037024\","
379                 + " \"unitFamily\": \"BBU\","
380                 + " \"vendorName\": \"Nokia\","
381                 + " \"softwareVersion\": \"v4.5.0.1\","
382                 + " \"oamV4IpAddress\": \"10.16.123.234\","
383                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
384                 + "}}}";
385
386         DmaapConsumerJsonParser dmaapConsumerJsonParser = spy(new DmaapConsumerJsonParser());
387         JsonElement jsonElement = new JsonParser().parse(parsed);
388         Mockito.doReturn(Optional.of(jsonElement.getAsJsonObject()))
389             .when(dmaapConsumerJsonParser).getJsonObjectFromAnArray(jsonElement);
390         String jsonWithoutIpInformation =
391             "[{\"event\": {"
392                 + "\"commonEventHeader\": {\"sourceName\": \"\"},"
393                 + "\"pnfRegistrationFields\": {"
394                 + " \"unitType\": \"AirScale\","
395                 + " \"serialNumber\": \"QTFCOC540002E\","
396                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
397                 + " \"manufactureDate\": \"1535014037024\","
398                 + " \"modelNumber\": \"7BEA\",\n"
399                 + " \"lastServiceDate\": \"1535014037024\","
400                 + " \"unitFamily\": \"BBU\","
401                 + " \"vendorName\": \"Nokia\","
402                 + " \"softwareVersion\": \"v4.5.0.1\","
403                 + " \"oamV4IpAddress\": \"10.16.123.234\","
404                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
405                 + "}}}]";
406         StepVerifier.create(dmaapConsumerJsonParser.getJsonObject(Mono.just(jsonWithoutIpInformation)))
407             .expectSubscription().thenRequest(1).verifyComplete();
408     }
409
410     @Test
411     void whenPassingCorrectJsoArrayWithoutIpv4_validationNotThrowingAnException() {
412         //given
413         String message =
414                 "[{\"event\": {"
415                 + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
416                 + "\"pnfRegistrationFields\": {"
417                 + " \"equip-vendor\": \"nokia\","
418                 + " \"serial-number\": \"QTFCOC540002E\","
419                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
420                 + " \"equip-model\": \"3310\","
421                 + " \"equip-type\": \"type\",\n"
422                 + " \"nf-role\": \"role\","
423                 + " \"unitFamily\": \"BBU\","
424                 + " \"sw-version\": \"v4.5.0.1\","
425                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
426                 + "}}},"
427                 + "{\"event\": {"
428                 + "\"commonEventHeader\": { \"sourceName\":\"NOKQTFCOC540002E\"},"
429                 + "\"pnfRegistrationFields\": {"
430                 + " \"equip-vendor\": \"nokia\","
431                 + " \"serial-number\": \"QTFCOC540002E\","
432                 + " \"pnfRegistrationFieldsVersion\": \"2.0\","
433                 + " \"equip-model\": \"3310\","
434                 + " \"equip-type\": \"type\",\n"
435                 + " \"nf-role\": \"role\","
436                 + " \"unitFamily\": \"BBU\","
437                 + " \"sw-version\": \"v4.5.0.1\","
438                 + " \"oamV6IpAddress\": \"0:0:0:0:0:FFFF:0A10:7BEA\""
439                 + "}}}]";
440
441         ConsumerDmaapModel expectedObject = ImmutableConsumerDmaapModel.builder()
442                 .ipv4("")
443                 .ipv6("0:0:0:0:0:FFFF:0A10:7BEA")
444                 .correlationId("NOKQTFCOC540002E")
445                 .serialNumber("QTFCOC540002E")
446                 .equipVendor("nokia")
447                 .equipModel("3310")
448                 .equipType("type")
449                 .nfRole("role")
450                 .swVersion("v4.5.0.1")
451                 .build();
452         //when
453         DmaapConsumerJsonParser dmaapConsumerJsonParser = new DmaapConsumerJsonParser();
454
455         //then
456         StepVerifier.create(dmaapConsumerJsonParser.getJsonObject(Mono.just(message)))
457             .expectSubscription().expectNext(expectedObject).expectNext(expectedObject).verifyComplete();
458     }
459 }