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 --- .../carrier/restserver/SupportApexEventReceiver.java | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver') diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java index cd60c220d..773ecafb2 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 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. @@ -21,6 +22,7 @@ package org.onap.policy.apex.plugins.event.carrier.restserver; import java.util.Properties; +import lombok.Getter; import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.engine.event.ApexEventReceiver; @@ -28,6 +30,7 @@ import org.onap.policy.apex.service.engine.event.ApexEventReceiver; * Support Apex event reveiver for unit test. * */ +@Getter public class SupportApexEventReceiver implements ApexEventReceiver { private long lastExecutionId; private Object lastEvent; @@ -52,21 +55,4 @@ public class SupportApexEventReceiver implements ApexEventReceiver { this.lastEvent = event; this.eventCount++; } - - public long getLastExecutionId() { - return lastExecutionId; - } - - public Object getLastEvent() { - return lastEvent; - } - - /** - * Get the number of events received. - * - * @return the number of events received - */ - public int getEventCount() { - return eventCount; - } } -- cgit 1.2.3-korg