aboutsummaryrefslogtreecommitdiffstats
path: root/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java')
-rw-r--r--utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java b/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java
index 11ee63c0..f16764c9 100644
--- a/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java
+++ b/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java
@@ -76,10 +76,11 @@ public class GsonTestUtilsTest {
utils.compareGson(data, GsonTestUtilsTest.class);
// file not found
- assertThatThrownBy(() -> utils.compareGson(data,
- new File(GsonTestUtilsTest.class.getSimpleName() + "-NotFound.json")))
- .isInstanceOf(JsonParseException.class)
- .hasCauseInstanceOf(FileNotFoundException.class);
+ File file = new File(GsonTestUtilsTest.class.getSimpleName() + "-NotFound.json");
+
+ assertThatThrownBy(() -> utils.compareGson(data, file))
+ .isInstanceOf(JsonParseException.class)
+ .hasCauseInstanceOf(FileNotFoundException.class);
// force I/O error while reading file
GsonTestUtils utils2 = new GsonTestUtils() {