import java.io.Serializable;
import java.util.List;
-
import lombok.NonNull;
/**
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.function.Function;
-
import javax.persistence.CascadeType;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
import javax.persistence.Table;
import javax.ws.rs.core.Response;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.apache.commons.lang3.StringUtils;
import org.onap.policy.models.base.PfValidationResult.ValidationResult;
import java.util.List;
import java.util.stream.Collectors;
-
import lombok.Builder;
import lombok.Data;
import lombok.NonNull;
if (LATEST_VERSION.equals(version)) {
return this.latestVersionFilter(returnList);
- }
- else {
+ } else {
return returnList;
}
}
import java.util.NavigableMap;
import java.util.Set;
import java.util.TreeSet;
-
import org.onap.policy.common.utils.validation.Assertions;
/**
break;
}
foundKey = nextkey;
- }
- while (true);
+ } while (true);
return conceptMap.get(foundKey);
}
break;
}
returnSet.add(conceptMap.get(foundKey));
- }
- while (true);
+ } while (true);
return returnSet;
}
import java.util.ArrayList;
import java.util.List;
-
import lombok.Getter;
import lombok.NonNull;
import lombok.ToString;
-
import org.onap.policy.common.utils.validation.Assertions;
import org.onap.policy.models.base.PfValidationResult.ValidationResult;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
-
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.onap.policy.common.utils.validation.Assertions;
import org.onap.policy.models.base.PfValidationResult.ValidationResult;
result = validateArtifactKeyInModel((PfConceptKey) pfKey, artifactKeySet, result);
} else if (pfKey instanceof PfReferenceKey) {
result = validateReferenceKeyInModel((PfReferenceKey) pfKey, referenceKeySet, result);
- }
- // It must be a PfKeyUse, nothing else is legal
- else {
+ } else {
+ // It must be a PfKeyUse, nothing else is legal
usedKeySet.add((PfKeyUse) pfKey);
}
}
package org.onap.policy.models.base;
import javax.ws.rs.core.Response;
-
import lombok.Getter;
import lombok.ToString;
-
import org.onap.policy.models.errors.concepts.ErrorResponse;
import org.onap.policy.models.errors.concepts.ErrorResponseInfo;
import org.onap.policy.models.errors.concepts.ErrorResponseUtils;
package org.onap.policy.models.base;
import javax.ws.rs.core.Response;
-
import lombok.Getter;
import lombok.ToString;
-
import org.onap.policy.models.errors.concepts.ErrorResponse;
import org.onap.policy.models.errors.concepts.ErrorResponseInfo;
import org.onap.policy.models.errors.concepts.ErrorResponseUtils;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
/**
import java.util.ArrayList;
import java.util.List;
-
import javax.persistence.Column;
import javax.persistence.Embeddable;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.onap.policy.common.utils.validation.Assertions;
import org.onap.policy.models.base.PfValidationResult.ValidationResult;
import java.util.LinkedList;
import java.util.List;
-
import lombok.Getter;
/**
import static org.junit.Assert.assertNotNull;
import java.io.IOException;
-
import javax.ws.rs.core.Response;
-
import org.junit.Test;
import org.onap.policy.models.errors.concepts.ErrorResponse;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.testconcepts.DummyAuthorativeConcept;
import org.onap.policy.models.base.testconcepts.DummyBadPfConceptContainer;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
/**
assertThatThrownBy(() -> getter.get((String) null, VERSION001)).hasMessage("conceptKeyName may not be null");
assertEquals(keyW002, getter.get("W", VERSION002));
- assertEquals(keyW002, getter.get("W", (String)null));
+ assertEquals(keyW002, getter.get("W", (String) null));
assertEquals(new TreeSet<PfConceptKey>(keyMap.values()), getter.getAll(null));
assertEquals(new TreeSet<PfConceptKey>(keyMap.values()), getter.getAll(null, null));
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Field;
-
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-
import org.junit.Test;
import org.onap.policy.models.base.PfKey.Compatibility;
import org.onap.policy.models.base.testconcepts.DummyPfKey;
import static org.junit.Assert.assertEquals;
import javax.ws.rs.core.Response;
-
import org.junit.Test;
import org.onap.policy.models.errors.concepts.ErrorResponseInfo;
import java.util.function.Function;
import java.util.function.Predicate;
import org.junit.Test;
-
import org.onap.policy.models.base.testconcepts.DummyPfObject;
import org.onap.policy.models.base.testconcepts.DummyPfObjectFilter;
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Field;
-
import org.junit.Test;
public class PfReferenceKeyTest {
import static org.junit.Assert.assertTrue;
import java.util.Date;
-
import org.junit.Test;
public class PfTimestampKeyTest {
@Test
public void testMapMap() {
- Map<String,String> resultMap = PfUtils.mapMap(null, item -> {
+ Map<String, String> resultMap = PfUtils.mapMap(null, item -> {
throw new RuntimeException("should not be invoked");
});
assertNull(resultMap);
- Map<String,String> origMap = new TreeMap<>();
+ Map<String, String> origMap = new TreeMap<>();
origMap.put("key2A", "xyz2");
origMap.put("key2B", "pdq2");
- Map<String,String> newMap = PfUtils.mapMap(origMap, text -> text + "X");
+ Map<String, String> newMap = PfUtils.mapMap(origMap, text -> text + "X");
assertEquals("{key2A=xyz2X, key2B=pdq2X}", newMap.toString());
import lombok.Data;
import lombok.NoArgsConstructor;
-
import org.onap.policy.models.base.PfNameVersion;
/**
package org.onap.policy.models.base.testconcepts;
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptKey;
/**
package org.onap.policy.models.base.testconcepts;
import java.util.Map;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptContainer;
import org.onap.policy.models.base.PfConceptKey;
package org.onap.policy.models.base.testconcepts;
import java.util.Map;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptContainer;
import org.onap.policy.models.base.PfConceptKey;
package org.onap.policy.models.base.testconcepts;
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelRuntimeException;
package org.onap.policy.models.base.testconcepts;
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelRuntimeException;
import java.util.Arrays;
import java.util.List;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConcept;
import org.onap.policy.models.base.PfKey;
import org.onap.policy.models.base.PfValidationResult;
package org.onap.policy.models.base.testconcepts;
import lombok.Data;
-
import org.onap.policy.models.base.PfNameVersion;
/**
import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
-
import org.apache.commons.lang3.ObjectUtils;
import org.onap.policy.models.base.PfNameVersion;
package org.onap.policy.models.base.testconcepts;
import java.util.List;
-
import lombok.Data;
-
import org.onap.policy.models.base.PfObjectFilter;
/**
import java.lang.reflect.InvocationTargetException;
import javax.ws.rs.core.Response;
-
import org.onap.policy.common.utils.validation.Assertions;
import org.onap.policy.models.base.PfModelException;
import org.slf4j.Logger;
package org.onap.policy.models.dao.converters;
import java.util.UUID;
-
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.util.Date;
import java.util.List;
import java.util.Map;
-
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.TypedQuery;
import javax.ws.rs.core.Response;
-
import org.onap.policy.models.base.PfConcept;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelException;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
-
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.onap.policy.common.utils.validation.Assertions;
import org.onap.policy.models.base.PfConcept;
import org.onap.policy.models.base.PfConceptKey;
import java.util.ArrayList;
import java.util.List;
-
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.onap.policy.common.utils.validation.Assertions;
import org.onap.policy.models.base.PfConcept;
import org.onap.policy.models.base.PfKey;
import java.util.ArrayList;
import java.util.List;
-
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConcept;
import org.onap.policy.models.base.PfKey;
import org.onap.policy.models.base.PfTimestampKey;
import static org.junit.Assert.assertEquals;
import java.util.UUID;
-
import org.junit.Test;
/**
package org.onap.policy.models.decisions.concepts;
import javax.ws.rs.core.Response;
-
import lombok.Getter;
import lombok.ToString;
-
import org.onap.policy.models.errors.concepts.ErrorResponse;
import org.onap.policy.models.errors.concepts.ErrorResponseInfo;
import org.onap.policy.models.errors.concepts.ErrorResponseUtils;
package org.onap.policy.models.decisions.concepts;
import java.util.Map;
-
import lombok.Data;
/**
package org.onap.policy.models.decisions.serialization;
import com.google.gson.GsonBuilder;
-
import org.onap.policy.common.gson.GsonMessageBodyHandler;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package org.onap.policy.models.decisions.serialization;
import com.google.gson.GsonBuilder;
-
import org.onap.policy.common.gson.GsonMessageBodyHandler;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
import org.onap.policy.common.utils.test.ToStringTester;
package org.onap.policy.models.errors.concepts;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.List;
-
import javax.ws.rs.core.Response;
-
import lombok.Data;
/**
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
-
import javax.ws.rs.core.Response;
-
import org.junit.Test;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.slf4j.Logger;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
-
import org.junit.Test;
/**
import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
import org.onap.policy.common.utils.test.ToStringTester;
verify(webAsync).put(requestCaptor.capture(), any(InvocationCallback.class));
String reqText = requestCaptor.getValue().getEntity();
- Map<String,String> reqMap = coder.decode(reqText, Map.class);
+ Map<String, String> reqMap = coder.decode(reqText, Map.class);
// sort the request fields so they match the order in cq.json
Map<String, String> request = new TreeMap<>(reqMap);
/**
* Operator that uses HTTP. The operator's parameters must be an {@link HttpParams}.
*/
-public class HttpOperator extends TypedOperator<HttpConfig,HttpOperation<?>> {
+public class HttpOperator extends TypedOperator<HttpConfig, HttpOperation<?>> {
/**
* Constructs the object.
import lombok.Getter;
import org.onap.policy.controlloop.actorserviceprovider.Operation;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
-import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpParams;
/**
* Operator with typed parameter information.
AtomicReference<BidirectionalTopicConfig> configRef = new AtomicReference<>();
// @formatter:off
- OperationMaker<BidirectionalTopicConfig, BidirectionalTopicOperation<?,?>> maker =
+ OperationMaker<BidirectionalTopicConfig, BidirectionalTopicOperation<?, ?>> maker =
(params, config) -> {
paramsRef.set(params);
configRef.set(config);
}
@Override
- public BidirectionalTopicOperation<?,?> buildOperation(ControlLoopOperationParams params) {
+ public BidirectionalTopicOperation<?, ?> buildOperation(ControlLoopOperationParams params) {
return null;
}
}
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
- /**
+ /*
* Attach appender to the logger.
*/
appender.setContext(logger.getLoggerContext());
import org.junit.Test;
import org.onap.policy.common.parameters.ValidationResult;
import org.onap.policy.controlloop.actorserviceprovider.Util;
-import org.onap.policy.controlloop.actorserviceprovider.parameters.ActorParams;
public class HttpPollingActorParamsTest {
}
private void testValidateField(String fieldName, String expected,
- Function<HttpPollingParamsBuilder<?,?>, HttpPollingParamsBuilder<?,?>> makeInvalid) {
+ Function<HttpPollingParamsBuilder<?, ?>, HttpPollingParamsBuilder<?, ?>> makeInvalid) {
// original params should be valid
ValidationResult result = params.validate(CONTAINER);
package org.onap.policy.appc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.time.Instant;
import java.util.ArrayList;
package org.onap.policy.appc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
package org.onap.policy.appc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
package org.onap.policy.appc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
-
import java.lang.reflect.Type;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Map;
import java.util.UUID;
-
import org.junit.Test;
public class CommonHeaderTest {
import java.util.HashMap;
import java.util.Map;
-
import org.junit.Test;
public class RequestTest {
import java.util.HashMap;
import java.util.Map;
-
import org.junit.Test;
public class ResponseTest {
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
-
import org.junit.Test;
public class SerializationTest {
package org.onap.policy.appclcm;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.time.Instant;
import java.util.HashMap;
package org.onap.policy.appclcm;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Data;
package org.onap.policy.appclcm;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.Map;
import lombok.AllArgsConstructor;
package org.onap.policy.appclcm;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Data;
import lombok.NoArgsConstructor;
package org.onap.policy.appclcm;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Data;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
-
import java.lang.reflect.Type;
import java.time.Instant;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
-
import org.junit.Test;
public class SerializationTest {
package org.onap.policy.cds;
import java.io.Serializable;
-
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
package org.onap.policy.controlloop;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.UUID;
import lombok.Data;
package org.onap.policy.controlloop;
import com.google.gson.annotations.SerializedName;
-
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
package org.onap.policy.controlloop;
import com.google.gson.annotations.SerializedName;
-
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
-
import java.lang.reflect.Type;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
-
import org.onap.policy.controlloop.ControlLoopNotificationType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
RestManager mgr = new RestManager();
Pair<Integer, String> result = mgr.get(getUri, null, null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("GOT: " + EXPECT_STRING, result.second);
result = mgr.delete(deleteUri, null, null, null, null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("DELETE: " + EXPECT_STRING, result.second);
result = mgr.delete(deleteUri, null, null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("DELETE: " + EXPECT_STRING, result.second);
result = mgr.put(putUri, null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PUT: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.put(putUriBlank, null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PUT: " + PAYLOAD + RETURN_STRING, result.second);
result = mgr.post(postUri, null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("POST: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.post(postUriBlank, null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("POST: " + PAYLOAD + RETURN_STRING, result.second);
result = mgr.patch(patchUri, null, null, null, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PATCH: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.patch(patchUriBlank, null, null, null, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PATCH: " + PAYLOAD + RETURN_STRING, result.second);
RestManager mgr = new RestManager();
Pair<Integer, String> result = mgr.get(getUri, "", null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("GOT: " + EXPECT_STRING, result.second);
result = mgr.delete(deleteUri, "", null, null, null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("DELETE: " + EXPECT_STRING, result.second);
result = mgr.put(putUri, "", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PUT: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.put(putUriBlank, "", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PUT: " + PAYLOAD + RETURN_STRING, result.second);
result = mgr.post(postUri, "", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("POST: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.post(postUriBlank, "", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("POST: " + PAYLOAD + RETURN_STRING, result.second);
result = mgr.patch(patchUri, "", null, null, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PATCH: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.patch(patchUriBlank, "", null, null, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PATCH: " + PAYLOAD + RETURN_STRING, result.second);
RestManager mgr = new RestManager();
Pair<Integer, String> result = mgr.get(getUri, "user", null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("GOT: " + EXPECT_STRING, result.second);
result = mgr.delete(deleteUri, "user", null, null, null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("DELETE: " + EXPECT_STRING, result.second);
result = mgr.put(putUri, "user", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PUT: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.put(putUriBlank, "user", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PUT: " + PAYLOAD + RETURN_STRING, result.second);
result = mgr.post(postUri, "user", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("POST: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.post(postUriBlank, "user", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("POST: " + PAYLOAD + RETURN_STRING, result.second);
result = mgr.patch(patchUri, "user", null, null, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PATCH: " + PAYLOAD + EXPECT_STRING, result.second);
result = mgr.patch(patchUriBlank, "user", null, null, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PATCH: " + PAYLOAD + RETURN_STRING, result.second);
RestManager mgr = new RestManager();
Pair<Integer, String> result = mgr.get(baseUri + "RestTest/GetHello/", null, null, null);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
result = mgr.delete(baseUri + "RestTest/DeleteHello/", null, null, null, null, null);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
result = mgr.put(baseUri + "RestTest/PutHello/", null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
result = mgr.post(baseUri + "RestTest/PostHello/", null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
result = mgr.patch(baseUri + "RestTest/PatchHello/", null, null, null, PAYLOAD);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
}
@Test
RestManager mgr = new RestManager();
Pair<Integer, String> result = mgr.get(baseUri + "RestTest/GetHello/" + NAME_PARAM, null, null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("GOT: " + RETURN_STRING + NAME_PARAM + " aged 90", result.second);
result = mgr.delete(baseUri + "RestTest/DeleteHello/" + NAME_PARAM, null, null, null, null, null);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("DELETE: " + RETURN_STRING + NAME_PARAM + " aged 90", result.second);
result = mgr.put(baseUri + "RestTest/PutHello/" + NAME_PARAM, null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PUT: " + PAYLOAD + RETURN_STRING + NAME_PARAM + " aged 90", result.second);
result = mgr.post(baseUri + "RestTest/PostHello/" + NAME_PARAM, null, null,
null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("POST: " + PAYLOAD + RETURN_STRING + NAME_PARAM + " aged 90", result.second);
result = mgr.patch(baseUri + "RestTest/PatchHello/" + NAME_PARAM, null, null,
null, PAYLOAD);
- assertEquals((Integer)200, result.first);
+ assertEquals((Integer) 200, result.first);
assertTrue(result.second != null);
assertTrue(result.second.length() > 0);
assertEquals("PATCH: " + PAYLOAD + RETURN_STRING + NAME_PARAM + " aged 90", result.second);
RestManager mgr = new RestManager();
Pair<Integer, String> result = mgr.get(baseUri + "NonExistant/URL/", null, null, null);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
result = mgr.delete(baseUri + "NonExistant/URL/", null, null, null, null, null);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
result = mgr.put(baseUri + "NonExistant/URL/", null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
result = mgr.post(baseUri + "NonExistant/URL/", null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
result = mgr.patch(baseUri + "NonExistant/URL/", null, null, null, PAYLOAD);
- assertEquals((Integer)404, result.first);
+ assertEquals((Integer) 404, result.first);
}
@Test
RestManager mgr = new RestManager();
Pair<Integer, String> result = mgr.get(deleteUri, null, null, null);
- assertEquals((Integer)405, result.first);
+ assertEquals((Integer) 405, result.first);
result = mgr.delete(getUri, null, null, null, null, null);
- assertEquals((Integer)405, result.first);
+ assertEquals((Integer) 405, result.first);
result = mgr.delete(getUri, null, null, null);
- assertEquals((Integer)405, result.first);
+ assertEquals((Integer) 405, result.first);
result = mgr.put(getUri, null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)405, result.first);
+ assertEquals((Integer) 405, result.first);
result = mgr.post(getUri, null, null, null, MediaType.TEXT_PLAIN, PAYLOAD);
- assertEquals((Integer)405, result.first);
+ assertEquals((Integer) 405, result.first);
result = mgr.patch(getUri, null, null, null, PAYLOAD);
- assertEquals((Integer)405, result.first);
+ assertEquals((Integer) 405, result.first);
}
@GET
@Path("/GetHello/{name}")
@Produces(MediaType.TEXT_PLAIN)
- public String getIt( @PathParam("name") String name, @DefaultValue("90") @QueryParam("age") String age) {
+ public String getIt(@PathParam("name") String name, @DefaultValue("90") @QueryParam("age") String age) {
return "GOT: " + RETURN_STRING + name + " aged " + age;
}
@DELETE
@Path("/DeleteHello/{name}")
@Produces(MediaType.TEXT_PLAIN)
- public String deleteIt( @PathParam("name") String name, @DefaultValue("90") @QueryParam("age") String age) {
+ public String deleteIt(@PathParam("name") String name, @DefaultValue("90") @QueryParam("age") String age) {
return "DELETE: " + RETURN_STRING + name + " aged " + age;
}
@PUT
@Path("/PutBlank")
@Produces(MediaType.TEXT_PLAIN)
- public String putIt( String payload) {
+ public String putIt(String payload) {
return "PUT: " + payload + RETURN_STRING;
}
@POST
@Path("/PostBlank")
@Produces(MediaType.TEXT_PLAIN)
- public String postBlank( String payload) {
+ public String postBlank(String payload) {
return "POST: " + payload + RETURN_STRING;
}
@Patch
@Path("/PatchBlank")
@Produces(MERGE_PATCH_PLUS_JSON)
- public String patchBlank( String payload) {
+ public String patchBlank(String payload) {
return "PATCH: " + payload + RETURN_STRING;
}
}
import java.io.Serializable;
import java.util.UUID;
-
import lombok.Data;
@Data
package org.onap.policy.sdc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.UUID;
-
import lombok.Data;
@Data
import static org.junit.Assert.assertTrue;
import java.util.UUID;
-
import org.junit.Test;
public class ResourceInstanceTest {
import static org.junit.Assert.assertTrue;
import java.util.UUID;
-
import org.junit.Test;
public class ResourceTest {
import static org.junit.Assert.assertTrue;
import java.util.UUID;
-
import org.junit.Test;
public class ServiceInstanceTest {
import static org.junit.Assert.assertTrue;
import java.util.UUID;
-
import org.junit.Test;
public class ServiceTest {
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.JsonSyntaxException;
-
import java.util.HashMap;
import java.util.Map;
-
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
import org.onap.policy.rest.RestManager;
import org.onap.policy.rest.RestManager.Pair;
import org.onap.policy.sdnc.util.Serialization;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.UUID;
import lombok.Getter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.sdnc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-
import org.junit.Test;
public class SdncRequestTest {
package org.onap.policy.sdnr;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.time.Instant;
import java.util.HashMap;
package org.onap.policy.sdnr;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
package org.onap.policy.sdnr;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
package org.onap.policy.sdnr;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
package org.onap.policy.sdnr;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
-
import java.lang.reflect.Type;
import java.time.Instant;
-
import org.onap.policy.sdnr.PciRequest;
import org.onap.policy.sdnr.PciResponse;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
-
import org.junit.Test;
public class PciCommonHeaderTest {
import static org.junit.Assert.assertTrue;
import java.util.UUID;
-
import org.junit.Test;
import org.onap.policy.sdnr.util.Serialization;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
-
import org.junit.Test;
public class SerializationTest {
package org.onap.policy.so;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
import static org.junit.Assert.assertTrue;
import java.time.LocalDateTime;
-
import org.junit.Test;
public class SoAsyncRequestStatusTest {
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class SoRequestDetailsTest {
import java.time.LocalDateTime;
import java.util.UUID;
-
import org.junit.Test;
public class SoRequestTest {
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-
import org.junit.Test;
public class SoResponseWrapperTest {
package org.onap.policy.vfc;
import java.io.Serializable;
-
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.vfc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
package org.onap.policy.vfc;
import com.google.gson.JsonSyntaxException;
-
import java.util.HashMap;
import java.util.Map;
-
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
package org.onap.policy.vfc;
import com.google.gson.annotations.SerializedName;
-
import java.io.Serializable;
import java.util.UUID;
import lombok.Getter;
assertEquals(action, additionalParams.getAction());
VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
- additionalParams.setActionInfo(actionInfo );
+ additionalParams.setActionInfo(actionInfo);
assertEquals(actionInfo, additionalParams.getActionInfo());
assertNotEquals(0, additionalParams.hashCode());
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-
import org.junit.Test;
public class VfcRequestTest {
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
public class VfcResponseDescriptorTest {
//
// They really shouldn't have any policies attached.
//
- if ((policy.getPolicies() != null || policy.getPolicies().isEmpty()) && callback != null ) {
+ if ((policy.getPolicies() != null || policy.getPolicies().isEmpty()) && callback != null) {
callback.onWarning("Open Loop policy contains policies. The policies will never be invoked.");
}
}
if (LOGGER.isDebugEnabled()) {
LOGGER.info("Trigger Node {}", node);
}
- if (graph.inDegreeOf(node) > 0 ) {
+ if (graph.inDegreeOf(node) > 0) {
//
// Really should NEVER get here unless someone messed up the code above.
//
if (! isRecipeOk(operPolicy, callback)) {
isOk = false;
}
- if (! isTargetOk(operPolicy, callback) ) {
+ if (! isTargetOk(operPolicy, callback)) {
isOk = false;
}
- if (! arePolicyResultsOk(operPolicy, callback) ) {
+ if (! arePolicyResultsOk(operPolicy, callback)) {
isOk = false;
}
return isOk;
// Check that policy results are connected to either default final * or another policy
//
boolean isOk = isSuccessPolicyResultOk(operPolicy, callback);
- if (! isFailurePolicyResultOk(operPolicy, callback) ) {
+ if (! isFailurePolicyResultOk(operPolicy, callback)) {
isOk = false;
}
- if (! isFailureRetriesPolicyResultOk(operPolicy, callback) ) {
+ if (! isFailureRetriesPolicyResultOk(operPolicy, callback)) {
isOk = false;
}
- if (! isFailureTimeoutPolicyResultOk(operPolicy, callback) ) {
+ if (! isFailureTimeoutPolicyResultOk(operPolicy, callback)) {
isOk = false;
}
- if (! isFailureExceptionPolicyResultOk(operPolicy, callback) ) {
+ if (! isFailureExceptionPolicyResultOk(operPolicy, callback)) {
isOk = false;
}
- if (! isFailureGuardPolicyResultOk(operPolicy, callback) ) {
+ if (! isFailureGuardPolicyResultOk(operPolicy, callback)) {
isOk = false;
}
return isOk;
package org.onap.policy.controlloop.guard.compiler;
import java.io.InputStream;
-
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-
import org.onap.policy.controlloop.compiler.CompilerException;
import org.onap.policy.controlloop.compiler.ControlLoopCompilerCallback;
import org.onap.policy.controlloop.policy.guard.Constraint;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
-
import org.onap.aai.domain.yang.Pnf;
import org.onap.policy.sdc.Resource;
import org.onap.policy.sdc.Service;
}
private boolean equalsMayBeNull(final Object obj1, final Object obj2) {
- if ( obj1 == null ) {
+ if (obj1 == null) {
return obj2 == null;
}
return obj1.equals(obj2);
package org.onap.policy.controlloop.policy.builder.impl;
import com.google.common.base.Strings;
-
import java.util.LinkedList;
import java.util.UUID;
-
import org.onap.aai.domain.yang.Pnf;
import org.onap.policy.controlloop.compiler.CompilerException;
import org.onap.policy.controlloop.compiler.ControlLoopCompiler;
import java.util.LinkedList;
import java.util.List;
-
import org.onap.policy.controlloop.policy.builder.Message;
import org.onap.policy.controlloop.policy.builder.Results;
public class Constraint {
private Integer freqLimitPerTarget;
- private Map<String,String> timeWindow;
+ private Map<String, String> timeWindow;
private Map<String, String> activeTimeRange;
private Integer minVnfCount;
private Integer maxVnfCount;
}
private boolean equalsMayBeNull(final Object obj1, final Object obj2) {
- if ( obj1 == null ) {
+ if (obj1 == null) {
return obj2 == null;
}
return obj1.equals(obj2);
package org.onap.policy.controlloop.policy.guard.builder.impl;
import java.util.LinkedList;
-
import org.onap.policy.controlloop.compiler.CompilerException;
import org.onap.policy.controlloop.compiler.ControlLoopCompilerCallback;
import org.onap.policy.controlloop.guard.compiler.ControlLoopGuardCompiler;
if (constraints == null) {
throw new BuilderException("Constraint much not be null");
}
- if (!addLimitConstraints(id,constraints)) {
+ if (!addLimitConstraints(id, constraints)) {
throw new BuilderException(NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID + id);
}
return this;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
import org.onap.policy.controlloop.policy.ControlLoopPolicy;
import org.onap.policy.controlloop.policy.FinalResult;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.UUID;
-
import org.junit.Ignore;
import org.junit.Test;
import org.onap.aai.domain.yang.Pnf;
import java.io.FileInputStream;
import java.io.InputStreamReader;
-
import org.junit.Test;
import org.onap.policy.common.utils.coder.YamlJsonTranslator;
import org.slf4j.Logger;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Ignore;
import org.junit.Test;
-
import org.onap.aai.domain.yang.Pnf;
import org.onap.policy.common.utils.io.Serializer;
import org.onap.policy.sdc.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import org.junit.Test;
public class ConstraintTest {
import java.util.LinkedList;
import java.util.List;
-
import org.junit.Test;
public class GuardPolicyTest {
import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
import org.onap.policy.common.utils.test.ToStringTester;
import java.util.List;
import java.util.stream.Collectors;
-
import lombok.Builder;
import lombok.Data;
import lombok.NonNull;
-
import org.apache.commons.lang3.ObjectUtils;
import org.onap.policy.models.base.PfObjectFilter;
import org.onap.policy.models.pdp.enums.PdpState;
import java.util.ArrayList;
import java.util.List;
-
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
-
import org.onap.policy.models.base.PfUtils;
import org.onap.policy.models.pdp.enums.PdpHealthStatus;
import org.onap.policy.models.pdp.enums.PdpMessageType;
package org.onap.policy.models.pdp.concepts;
import java.util.List;
-
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.ArrayList;
import java.util.List;
-
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfKey;
import org.onap.policy.models.base.PfModelException;
import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
import org.onap.policy.common.utils.test.ToStringTester;
import java.util.Arrays;
import java.util.Collections;
-
import org.junit.Test;
import org.onap.policy.models.pdp.enums.PdpHealthStatus;
import org.onap.policy.models.pdp.enums.PdpState;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfReferenceKey;
import java.util.ArrayList;
import java.util.Date;
-
import org.junit.Test;
import org.onap.policy.models.base.PfTimestampKey;
import org.onap.policy.models.base.PfValidationResult;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfReferenceKey;
jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_DRIVER, "org.h2.Driver");
jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_URL, "jdbc:h2:mem:testdb");
- daoParameters.setJdbcProperties(jdbcProperties );
+ daoParameters.setJdbcProperties(jdbcProperties);
pfDao = new PfDaoFactory().createPfDao(daoParameters);
pfDao.init(daoParameters);
package org.onap.policy.models.provider;
import lombok.Data;
-
import org.onap.policy.common.parameters.GroupValidationResult;
import org.onap.policy.common.parameters.ParameterGroup;
import org.onap.policy.common.parameters.ValidationStatus;
import java.util.Date;
import java.util.List;
import java.util.Properties;
-
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfModelRuntimeException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-
import javax.ws.rs.core.Response;
-
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.base.PfModelException;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import lombok.ToString;
-
import org.junit.Test;
/**
// @formatter:off
assertThatThrownBy(() -> {
factory.createPolicyModelsProvider(null);
- }) .hasMessageMatching("^parameters is marked .*on.*ull but is null$");
+ }).hasMessageMatching("^parameters is marked .*on.*ull but is null$");
assertThatThrownBy(() -> {
PolicyModelsProviderParameters pars = new PolicyModelsProviderParameters();
pars.setImplementation(null);
factory.createPolicyModelsProvider(pars);
- }) .hasMessage("could not find implementation of the \"PolicyModelsProvider\" interface \"null\"");
+ }).hasMessage("could not find implementation of the \"PolicyModelsProvider\" interface \"null\"");
assertThatThrownBy(() -> {
PolicyModelsProviderParameters pars = new PolicyModelsProviderParameters();
pars.setImplementation("com.acmecorp.RoadRunner");
factory.createPolicyModelsProvider(pars);
- }) .hasMessage("could not find implementation of the \"PolicyModelsProvider\" "
+ }).hasMessage("could not find implementation of the \"PolicyModelsProvider\" "
+ "interface \"com.acmecorp.RoadRunner\"");
assertThatThrownBy(() -> {
PolicyModelsProviderParameters pars = new PolicyModelsProviderParameters();
pars.setImplementation("java.lang.String");
factory.createPolicyModelsProvider(pars);
- }) .hasMessage(
+ }).hasMessage(
"the class \"java.lang.String\" is not an implementation of the \"PolicyModelsProvider\" interface");
assertThatThrownBy(() -> {
PolicyModelsProviderParameters pars = new PolicyModelsProviderParameters();
pars.setImplementation("org.onap.policy.models.provider.impl.DummyBadProviderImpl");
factory.createPolicyModelsProvider(pars);
- }) .hasMessage("could not create an instance of PolicyModelsProvider "
+ }).hasMessage("could not create an instance of PolicyModelsProvider "
+ "\"org.onap.policy.models.provider.impl.DummyBadProviderImpl\"");
// @formatter:on
}
import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
/**
import java.util.Base64;
import java.util.Date;
import java.util.List;
-
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.models.base.PfModelException;
package org.onap.policy.models.provider.impl;
import lombok.NonNull;
-
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
import java.util.ArrayList;
import java.util.Date;
-
import org.junit.Test;
import org.onap.policy.models.pdp.concepts.Pdp;
import org.onap.policy.models.pdp.concepts.PdpGroupFilter;
import java.net.URISyntaxException;
import java.util.Base64;
import java.util.Set;
-
import lombok.NonNull;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-
import lombok.NonNull;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.common.utils.coder.YamlJsonTranslator;
package org.onap.policy.models.sim.dmaap.parameters;
import java.io.File;
-
import org.onap.policy.common.parameters.GroupValidationResult;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.common.utils.coder.CoderException;
package org.onap.policy.models.sim.dmaap.parameters;
import lombok.Getter;
-
import org.onap.policy.common.parameters.ParameterGroupImpl;
import org.onap.policy.common.parameters.annotations.Min;
import org.onap.policy.common.parameters.annotations.NotBlank;
do {
result = group2data.computeIfAbsent(consumerGroup, maker).read(maxRead, waitMs);
- }
- while (result == ConsumerGroupData.UNREADABLE_LIST);
+ } while (result == ConsumerGroupData.UNREADABLE_LIST);
// @formatter:on
import io.swagger.annotations.Tag;
import java.net.HttpURLConnection;
import java.util.UUID;
-
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
if ((chr = reader.read()) < 0) {
return false;
}
- }
- while (Character.isWhitespace(chr));
+ } while (Character.isWhitespace(chr));
// push the last character back onto the reader
reader.reset();
coder = mock(Coder.class);
when(coder.encode(any())).thenThrow(new CoderException(EXPECTED_EXCEPTION));
- assertNull(data.convertMessageToString(new TreeMap<String,Object>(), coder));
+ assertNull(data.convertMessageToString(new TreeMap<String, Object>(), coder));
}
@Test
private static final Logger LOGGER = LoggerFactory.getLogger(PdpSimulatorActivator.class);
private final PdpSimulatorParameterGroup pdpSimulatorParameterGroup;
- private List<TopicSink> topicSinks;// topics to which pdp sends pdp status
+ private List<TopicSink> topicSinks; // topics to which pdp sends pdp status
private List<TopicSource> topicSources; // topics to which pdp listens to for messages from pap.
private static final String[] MSG_TYPE_NAMES = { "messageName" };
import java.io.StringWriter;
import java.net.URL;
import java.util.Arrays;
-
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
-
import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.sim.pdp.exception.PdpSimulatorException;
import org.onap.policy.models.sim.pdp.exception.PdpSimulatorRunTimeException;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
-
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClient;
import org.onap.policy.models.pdp.concepts.PdpStatus;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
-
import org.onap.policy.common.parameters.annotations.NotBlank;
import org.onap.policy.common.parameters.annotations.NotNull;
import static org.junit.Assert.assertTrue;
import java.util.Map;
-
import org.junit.Test;
import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
import org.onap.policy.common.parameters.GroupValidationResult;
import static org.junit.Assert.fail;
import java.io.FileNotFoundException;
-
import org.junit.Test;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.models.sim.pdp.PdpSimulatorCommandLineArguments;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-
import javax.ws.rs.core.Response;
-
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
-
import org.onap.policy.models.base.PfModelRuntimeException;
import org.onap.policy.models.base.PfNameVersion;
import java.util.List;
import java.util.stream.Collectors;
-
import lombok.Builder;
import lombok.Data;
import lombok.NonNull;
-
import org.onap.policy.models.base.PfObjectFilter;
/**
if (LATEST_VERSION.equals(version)) {
return this.latestVersionFilter(returnList);
- }
- else {
+ } else {
return returnList;
}
}
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.stream.Collectors;
-
import lombok.Builder;
import lombok.Data;
import lombok.NonNull;
-
import org.onap.policy.models.base.PfObjectFilter;
/**
if (LATEST_VERSION.equals(version)) {
return this.latestVersionFilter(returnList);
- }
- else {
+ } else {
return returnList;
}
}
import java.util.Collections;
import java.util.List;
import java.util.Map;
-
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-
import lombok.NonNull;
-
import org.apache.commons.collections4.CollectionUtils;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelException;
import java.util.HashMap;
import java.util.Map;
-
import javax.ws.rs.core.Response;
-
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelRuntimeException;
import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
package org.onap.policy.models.tosca.legacy.provider;
import java.util.Map;
-
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfModelRuntimeException;
package org.onap.policy.models.tosca.simple.concepts;
import java.io.Serializable;
-
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
-
import org.onap.policy.models.base.PfAuthorative;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConstraint;
package org.onap.policy.models.tosca.simple.concepts;
import javax.persistence.Column;
-
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NonNull;
import lombok.ToString;
-
import org.apache.commons.lang3.ObjectUtils;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConstraint;
if (toscaConstraint.getEqual() != null) {
operation = JpaToscaConstraintOperation.EQ;
compareTo = toscaConstraint.getEqual();
- }
- else if (toscaConstraint.getGreaterThan() != null) {
+ } else if (toscaConstraint.getGreaterThan() != null) {
operation = JpaToscaConstraintOperation.GT;
compareTo = toscaConstraint.getGreaterThan();
- }
- else if (toscaConstraint.getGreaterOrEqual() != null) {
+ } else if (toscaConstraint.getGreaterOrEqual() != null) {
operation = JpaToscaConstraintOperation.GE;
compareTo = toscaConstraint.getGreaterOrEqual();
- }
- else if (toscaConstraint.getLessThan() != null) {
+ } else if (toscaConstraint.getLessThan() != null) {
operation = JpaToscaConstraintOperation.LT;
compareTo = toscaConstraint.getLessThan();
- }
- else if (toscaConstraint.getLessOrEqual() != null) {
+ } else if (toscaConstraint.getLessOrEqual() != null) {
operation = JpaToscaConstraintOperation.LE;
compareTo = toscaConstraint.getLessOrEqual();
}
import java.util.ArrayList;
import java.util.List;
-
import javax.persistence.ElementCollection;
-
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NonNull;
import lombok.ToString;
-
import org.onap.policy.models.base.PfUtils;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConstraint;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Lob;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.apache.commons.collections4.CollectionUtils;
import org.onap.policy.models.base.PfAuthorative;
import org.onap.policy.models.base.PfConcept;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;
-
import org.onap.policy.models.base.PfConceptContainer;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfValidationResult;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
-
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.EmbeddedId;
import javax.persistence.MappedSuperclass;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.apache.commons.lang3.ObjectUtils;
import org.onap.policy.common.utils.validation.ParameterValidationUtils;
import org.onap.policy.models.base.PfAuthorative;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
-
import javax.persistence.Column;
import javax.persistence.ElementCollection;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.NonNull;
-
import org.apache.commons.lang3.ObjectUtils;
import org.onap.policy.common.utils.validation.Assertions;
import org.onap.policy.models.base.PfAuthorative;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;
-
import org.onap.policy.models.base.PfAuthorative;
import org.onap.policy.models.base.PfConceptContainer;
import org.onap.policy.models.base.PfConceptKey;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.ws.rs.core.Response;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.validation.ParameterValidationUtils;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Lob;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.apache.commons.collections4.CollectionUtils;
import org.onap.policy.models.base.PfAuthorative;
import org.onap.policy.models.base.PfConcept;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;
-
import org.onap.policy.models.base.PfConceptContainer;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfValidationResult;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.EmbeddedId;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.apache.commons.lang3.ObjectUtils;
import org.onap.policy.models.base.PfAuthorative;
import org.onap.policy.models.base.PfConcept;
package org.onap.policy.models.tosca.simple.concepts;
import com.google.gson.annotations.SerializedName;
-
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumns;
import javax.persistence.OneToOne;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.apache.commons.lang3.ObjectUtils;
import org.onap.policy.common.utils.validation.ParameterValidationUtils;
import org.onap.policy.models.base.PfAuthorative;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
-
import org.onap.policy.models.base.PfConceptContainer;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
package org.onap.policy.models.tosca.simple.concepts;
import java.util.List;
-
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.JoinColumns;
import javax.persistence.OneToOne;
import javax.persistence.Table;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
-
import org.apache.commons.lang3.ObjectUtils;
import org.onap.policy.models.base.PfAuthorative;
import org.onap.policy.models.base.PfConcept;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.apache.commons.collections4.CollectionUtils;
import org.onap.policy.models.base.PfConcept;
import org.onap.policy.models.base.PfConceptFilter;
package org.onap.policy.models.tosca.simple.provider;
import javax.ws.rs.core.Response.Status;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.dao.PfDao;
import java.util.Map;
import java.util.Map.Entry;
-
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfConceptContainer;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelRuntimeException;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Function;
-
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.apache.commons.collections4.CollectionUtils;
import org.onap.policy.models.base.PfConcept;
import org.onap.policy.models.base.PfConceptContainer;
import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
import org.onap.policy.common.utils.test.ToStringTester;
import static org.junit.Assert.assertTrue;
import com.google.gson.GsonBuilder;
-
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.common.utils.coder.CoderException;
import static org.junit.Assert.assertEquals;
import java.util.LinkedHashMap;
-
import org.junit.Test;
/**
import static org.junit.Assert.assertTrue;
import com.google.gson.GsonBuilder;
-
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.common.utils.coder.CoderException;
import static org.junit.Assert.assertEquals;
import java.util.LinkedHashMap;
-
import org.junit.Test;
/**
import java.util.List;
import java.util.Map;
import java.util.Properties;
-
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.junit.After;
import org.junit.Before;
import static org.junit.Assert.assertTrue;
import com.google.gson.GsonBuilder;
-
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Properties;
-
import org.apache.commons.lang3.ObjectUtils;
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.junit.After;
import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
import org.onap.policy.common.utils.test.ToStringTester;
import static org.junit.Assert.assertTrue;
import java.util.LinkedHashMap;
-
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.utils.coder.StandardCoder;
import static org.junit.Assert.assertNotNull;
import java.util.Properties;
-
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.junit.After;
import org.junit.Before;
import static org.junit.Assert.assertNull;
import java.util.ArrayList;
-
import org.junit.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConstraint;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConstraint;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfKey;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfValidationResult;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfValidationResult;
import java.util.Map;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelService;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfValidationResult;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfKey;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfKey;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfValidationResult;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfReferenceKey;
import java.util.Map;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfReferenceKey;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
import static org.junit.Assert.assertTrue;
import java.util.Date;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfReferenceKey;
import java.util.Map;
import java.util.TreeMap;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfReferenceKey;
import java.time.Duration;
import java.util.Date;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfReferenceKey;
import com.openpojo.validation.rule.impl.GetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
import org.onap.policy.common.utils.test.ToStringTester;
import static org.junit.Assert.assertNull;
import java.util.Properties;
-
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.junit.After;
import org.junit.Before;
import static org.junit.Assert.assertNull;
import java.util.Properties;
-
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.junit.After;
import org.junit.Before;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
-
import java.util.Map;
-
import org.junit.Test;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
-
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.utils.coder.CoderException;
import java.util.List;
import java.util.Map;
-
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.common.utils.coder.CoderException;
import static org.junit.Assert.assertEquals;
import java.util.Iterator;
-
import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.tosca.simple.concepts.JpaToscaDataType;
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
- Copyright (C) 2019 Nordix Foundation.
+ Copyright (C) 2019-2020 Nordix Foundation.
Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
Modifications Copyright (C) 2020 Bell Canada.
================================================================================
</dependencyManagement>
<build>
- <plugins>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <executions>
- <execution>
- <id>onap-java-style</id>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>process-sources</phase>
- <configuration>
- <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
- with minor changes -->
- <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
- <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
- <includeResources>true</includeResources>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <includeTestResources>true</includeTestResources>
- <excludes>
- </excludes>
- <consoleOutput>true</consoleOutput>
- <failOnViolation>true</failOnViolation>
- <violationSeverity>warning</violationSeverity>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.onap.oparent</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${oparent.version}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
<pluginManagement>
<plugins>
<plugin>