diff options
author | Jim Hahn <jrh3@att.com> | 2021-08-05 14:53:19 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-08-05 15:25:14 -0400 |
commit | da1b7d9f04453e94fb77ebe4213f456a0be63fc2 (patch) | |
tree | e59daec0050c7ce88c07f1d7f97168aa849128a7 /feature-session-persistence/src/test | |
parent | 1744dac574fb771301027be74c9257eb070125f7 (diff) |
Use lombok in drools-pdp #2
Updated feature-session-persistence thru drools-domains.
Issue-ID: POLICY-3397
Change-Id: I0b1c6da8b2301c00dd792675e8cf1f49888edb9f
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-session-persistence/src/test')
2 files changed, 5 insertions, 18 deletions
diff --git a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java index 2cc7d33a..bd979162 100644 --- a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java +++ b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-session-persistence * ================================================================================ - * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 2020-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. @@ -173,20 +173,7 @@ public class DroolsSessionEntityTest { * @param sessid session id * @return a new session Entity */ - @SuppressWarnings("serial") private DroolsSessionEntity makeEnt2(String sessnm, long sessid) { - - return new DroolsSessionEntity() { - - @Override - public String getSessionName() { - return sessnm; - } - - @Override - public long getSessionId() { - return sessid; - } - }; + return new DroolsSessionEntity(sessnm, sessid); } } diff --git a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java index ec261982..4450b8c8 100644 --- a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java +++ b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-session-persistence * ================================================================================ - * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 2020-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. @@ -188,7 +188,7 @@ public class PersistenceFeatureTest { KieContainer kiecont = mock(KieContainer.class); when(polcont.getKieContainer()).thenReturn(kiecont); - when(polsess.getPolicyContainer()).thenReturn(polcont); + when(polsess.getContainer()).thenReturn(polcont); when(kiecont.getKieBase(anyString())).thenReturn(kiebase); } @@ -1167,7 +1167,7 @@ public class PersistenceFeatureTest { when(sess.getSessionId()).thenReturn(sessid); - when(polsess.getPolicyContainer()).thenReturn(polcont); + when(polsess.getContainer()).thenReturn(polcont); when(polsess.getName()).thenReturn(sessnm); if (loadOk) { |