[LIB-10] SerialVersionUID for Serializable classes
[snooker-score-api.git] / src / test / java / org / hedgecode / snooker / json / AbstractJsonTest.java
index 6158dc3..d42fd4d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017. Developed by Hedgecode.
+ * Copyright (c) 2017-2020. Developed by Hedgecode.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -80,6 +80,12 @@ public abstract class AbstractJsonTest extends Assert {
         return sb.toString();
     }
 
+    protected void verifySerialize(Serializable serializeObject) throws IOException {
+        if (!serializeFile.exists()) {
+            serialize(serializeObject);
+        }
+    }
+
     protected void serialize(Serializable serializeObject) throws IOException {
         try (ObjectOutputStream oos =
                      new ObjectOutputStream(