2 * Copyright 2016-2017, Nokia Corporation
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.spring;
19 import com.nokia.cbam.lcm.v32.model.VnfIdentifierCreationNotification;
20 import com.nokia.cbam.lcm.v32.model.VnfIdentifierDeletionNotification;
21 import com.nokia.cbam.lcm.v32.model.VnfInfoAttributeValueChangeNotification;
22 import com.nokia.cbam.lcm.v32.model.VnfLifecycleChangeNotification;
23 import org.junit.Test;
24 import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
25 import org.springframework.http.MediaType;
27 public class TestRealConfig {
30 * test that the converter can transform the inherited classes
33 public void test() throws Exception {
34 HttpMessageConverters converters = new RealConfig().customConverters();
36 converters.getConverters().get(0).canRead(VnfIdentifierCreationNotification.class, MediaType.APPLICATION_JSON);
37 converters.getConverters().get(0).canRead(VnfIdentifierDeletionNotification.class, MediaType.APPLICATION_JSON);
38 converters.getConverters().get(0).canRead(VnfInfoAttributeValueChangeNotification.class, MediaType.APPLICATION_JSON);
39 converters.getConverters().get(0).canRead(VnfLifecycleChangeNotification.class, MediaType.APPLICATION_JSON);
40 converters.getConverters().get(0).canRead(String.class, MediaType.APPLICATION_JSON);