Use Strimzi Kafka and Kafka native APIs
[ccsdk/features.git] / sdnr / wt / mountpoint-registrar / provider / src / test / java / org / onap / ccsdk / features / sdnr / wt / mountpointregistrar / test / client / TestCMBasicHeaderFieldsNotification.java
1 /*
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt mountpoint-registrar
4  * =================================================================================================
5  * Copyright (C) 2021 Samsung Electronics Intellectual Property. All rights reserved.
6  * =================================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software distributed under the License
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing permissions and limitations under
15  * the License.
16  * ============LICENSE_END==========================================================================
17  */
18 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test.client;
19
20 import static org.junit.Assert.assertEquals;
21
22 import org.junit.Test;
23 import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.vesdomain.cm.CMBasicHeaderFieldsNotification;
24
25 public class TestCMBasicHeaderFieldsNotification {
26
27     private CMBasicHeaderFieldsNotification cmBasicFields;
28
29     @Test
30     public void testCMBasicFieldsBuilder() {
31         cmBasicFields = cmBasicFields.builder()
32             .withCMNodeId("test-node")
33             .withCMSequence("1")
34             .withCMOccurrenceTime("2021-10-18T15:25:19.948Z")
35             .withSourceId("src_device_id_1732")
36             .withNotificationType("notifyMOIChanges")
37             .build();
38
39         assertEquals("test-node", cmBasicFields.getCmNodeId());
40         assertEquals("1", cmBasicFields.getCmSequence());
41         assertEquals("src_device_id_1732", cmBasicFields.getSourceId());
42         assertEquals("2021-10-18T15:25:19.948Z", cmBasicFields.getCmOccurrenceTime());
43         assertEquals("notifyMOIChanges", cmBasicFields.getNotificationType());
44     }
45 }