Migrate to Truth's assertThat to test Optional.isPresent

Change-Id: Ia24cc9d8ae07c0103b49772ef94deb8c41a53cf6
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/AddPropertyToFieldParametersExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/AddPropertyToFieldParametersExtractorTest.java
index fb047f7..b95f5ef 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/AddPropertyToFieldParametersExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/AddPropertyToFieldParametersExtractorTest.java
@@ -14,6 +14,7 @@
 
 package com.googlesource.gerrit.plugins.its.base.workflow;
 
+import static com.google.common.truth.Truth8.assertThat;
 import static org.easymock.EasyMock.expect;
 
 import com.google.gerrit.extensions.config.FactoryModule;
@@ -96,9 +97,7 @@
 
     Optional<AddPropertyToFieldParameters> extractedParameters =
         extractor.extract(actionRequest, Collections.singletonMap(PROPERTY_ID, PROPERTY_VALUE));
-    if (!extractedParameters.isPresent()) {
-      fail();
-    }
+    assertThat(extractedParameters).isPresent();
     assertEquals(PROPERTY_VALUE, extractedParameters.get().getPropertyValue());
     assertEquals(FIELD_ID, extractedParameters.get().getFieldId());
   }
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/CreateVersionFromPropertyParametersExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/CreateVersionFromPropertyParametersExtractorTest.java
index 82b33e7..91a9113 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/CreateVersionFromPropertyParametersExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/CreateVersionFromPropertyParametersExtractorTest.java
@@ -1,5 +1,6 @@
 package com.googlesource.gerrit.plugins.its.base.workflow;
 
+import static com.google.common.truth.Truth8.assertThat;
 import static org.easymock.EasyMock.expect;
 
 import com.google.gerrit.extensions.config.FactoryModule;
@@ -75,9 +76,7 @@
 
     Optional<CreateVersionFromPropertyParameters> extractedParameters =
         extractor.extract(actionRequest, Collections.singletonMap(PROPERTY_ID, PROPERTY_VALUE));
-    if (!extractedParameters.isPresent()) {
-      fail();
-    }
+    assertThat(extractedParameters).isPresent();
     assertEquals(PROPERTY_VALUE, extractedParameters.get().getPropertyValue());
   }
 }