From dc101c2ad5e27d5a0afd4e2feeb8885f24728806 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Tue, 24 Aug 2021 13:20:26 -0400 Subject: Use CompareToBuilder Also added lombok to test classes. Issue-ID: POLICY-3391 Change-Id: I9ecf479f3861a2e5211b037e885029d1719b6a56 Signed-off-by: Jim Hahn --- .../myfirstpolicy/TestSaleAuthListener.java | 23 +++++----------------- 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'examples/examples-myfirstpolicy/src') diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java index 1281c515d..01c24d6de 100644 --- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java +++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. + * 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. @@ -26,6 +27,8 @@ import static org.awaitility.Awaitility.await; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; +import lombok.AllArgsConstructor; +import lombok.Getter; import org.onap.policy.apex.core.engine.engine.EnEventListener; import org.onap.policy.apex.core.engine.event.EnEvent; @@ -37,22 +40,15 @@ import org.onap.policy.apex.core.engine.event.EnEvent; * * @author Liam Fallon (liam.fallon@ericsson.com) */ +@AllArgsConstructor public class TestSaleAuthListener implements EnEventListener { // CHECKSTYLE:OFF: MagicNumber private final List resultEvents = new ArrayList<>(); + @Getter private final String id; - /** - * Instantiates a new action listener. - * - * @param id the id - */ - public TestSaleAuthListener(final String id) { - this.id = id; - } - /** * Gets the result. * @@ -73,13 +69,4 @@ public class TestSaleAuthListener implements EnEventListener { resultEvents.add(saleauthEvent); } } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } } -- cgit 1.2.3-korg