From 9344ec1396b7151262e9b4ac48c72020e2b03e7e Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 2 Aug 2021 16:36:26 -0400 Subject: Use lombok in apex-pdp #5 Updated examples thru integration-executor-test. Issue-ID: POLICY-3391 Change-Id: Idc707146a646d05720675a787761c199484048e9 Signed-off-by: Jim Hahn --- .../executor/engine/TestApexActionListener.java | 18 ++++++------------ .../handling/TestApexSamplePolicyModelCreator.java | 18 ++++++------------ 2 files changed, 12 insertions(+), 24 deletions(-) (limited to 'testsuites/integration/integration-executor-test') diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexActionListener.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexActionListener.java index 88650c609..da9036103 100644 --- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexActionListener.java +++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexActionListener.java @@ -1,19 +1,20 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -22,6 +23,7 @@ package org.onap.policy.apex.testsuites.integration.executor.engine; import java.util.ArrayList; import java.util.List; +import lombok.Getter; import org.onap.policy.apex.core.engine.engine.EnEventListener; import org.onap.policy.apex.core.engine.event.EnEvent; import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; @@ -41,6 +43,7 @@ public class TestApexActionListener implements EnEventListener { private List resultEvents = new ArrayList<>(); + @Getter private final String id; /** @@ -84,13 +87,4 @@ public class TestApexActionListener implements EnEventListener { } resultEvents.add(actionEvent); } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } } diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModelCreator.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModelCreator.java index f8afc665f..388d9f954 100644 --- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModelCreator.java +++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModelCreator.java @@ -1,25 +1,27 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ package org.onap.policy.apex.testsuites.integration.executor.handling; +import lombok.AllArgsConstructor; import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; import org.onap.policy.apex.testsuites.integration.common.model.SampleDomainModelFactory; @@ -29,18 +31,10 @@ import org.onap.policy.apex.testsuites.integration.common.model.SampleDomainMode * * @author Liam Fallon (liam.fallon@ericsson.com) */ +@AllArgsConstructor public class TestApexSamplePolicyModelCreator implements TestApexModelCreator { private String logicExecutorType; - /** - * Instantiates a new test apex sample policy model creator. - * - * @param logicExecutorType the logic executor type - */ - public TestApexSamplePolicyModelCreator(final String logicExecutorType) { - this.logicExecutorType = logicExecutorType; - } - /** * {@inheritDoc}. */ -- cgit 1.2.3-korg