1 package org.onap.vid.aai.model;
3 import org.codehaus.jackson.map.ObjectMapper;
4 import org.junit.Before;
7 import java.io.IOException;
8 import java.util.ArrayList;
10 import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
11 import static org.hamcrest.MatcherAssert.assertThat;
12 import static org.hamcrest.core.StringContains.containsString;
14 public class PnfPropertiesTest {
16 private PnfProperties pnfProperties;
20 pnfProperties = new PnfProperties();
21 pnfProperties.setAdditionalProperty("key1", "value1");
22 pnfProperties.setAdditionalProperty("key2", "value2");
26 public void shouldHaveValidGettersAndSetters() throws IOException {
27 String result = new ObjectMapper().writeValueAsString(pnfProperties);
28 assertThat(result, containsString("key1"));
29 assertThat(result, containsString("value2"));
30 assertThat(result, containsString("key2"));
31 assertThat(result, containsString("value2"));