Fix sonar issue in distributed locking

Fixed sonar issue:
- Refactor the code of the lambda to have only one invocation throwing
  an exception

Issue-ID: POLICY-2616
Change-Id: I8d96b95d0da9a780daacec7a4de17167642b03c1
Signed-off-by: Jim Hahn <jrh3@att.com>
diff --git a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
index 4815271..0c0dbf1 100644
--- a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
+++ b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
@@ -258,7 +258,8 @@
             }
         };
 
-        assertThatThrownBy(() -> feature.beforeCreateLockManager(engine, new Properties()))
+        Properties props = new Properties();
+        assertThatThrownBy(() -> feature.beforeCreateLockManager(engine, props))
                         .isInstanceOf(DistributedLockManagerException.class);
     }