templatesUnderTest() {
- // XXX: Drop the filter once we have added tests for AssertJ!
- return TEMPLATES_BY_GROUP.entries().stream()
- .filter(e -> !"AssertJ".equals(e.getKey()))
- .map(e -> arguments(e.getKey(), e.getValue()));
- }
-
- /**
- * Verifies that {@link Refaster#loadAllCodeTransformers} finds at least one code transformer for
- * all of the {@link #TEMPLATE_GROUPS}.
- *
- * This test is just as much about ensuring that {@link #TEMPLATE_GROUPS} is exhaustive, so
- * that in turn {@link #replacement}'s coverage is exhaustive.
- */
- @Test
- void loadAllCodeTransformers() {
- assertThat(TEMPLATES_BY_GROUP.keySet()).hasSameElementsAs(TEMPLATE_GROUPS);
- }
-
- /**
- * Verifies for each of the {@link #TEMPLATE_GROUPS} that the associated code transformers have
- * the desired effect.
- */
- @MethodSource("templateGroupsUnderTest")
- @ParameterizedTest
- void replacement(String group) {
- verifyRefactoring(group, namePattern(group));
- }
-
- /**
- * Verifies that all loaded Refaster templates are covered by at least one test.
- *
- *
Note that this doesn't guarantee full coverage: this test cannot ascertain that all {@link
- * com.google.errorprone.refaster.Refaster#anyOf} branches are tested. Idem for {@link
- * com.google.errorprone.refaster.annotation.BeforeTemplate} methods in case there are multiple .
- */
- @MethodSource("templatesUnderTest")
- @ParameterizedTest
- void coverage(String group, String template) {
- assertThatCode(() -> verifyRefactoring(group, namePattern(group, template)))
- .withFailMessage(
- "Template %s does not affect the tests for group %s; is it tested?", template, group)
- .isInstanceOf(ComparisonFailure.class);
- }
-
- private static ImmutableSetMultimap indexTemplateNamesByGroup(
- ImmutableSet templateNames) {
- return templateNames.stream()
- .collect(
- toImmutableSetMultimap(
- n -> TEMPLATE_FQCN_TRIM_FOR_GROUP_NAME.matcher(n).replaceAll(""), identity()));
- }
-
- private static String namePattern(String groupName, String excludedTemplate) {
- return "(?!" + Pattern.quote(excludedTemplate) + ')' + namePattern(groupName);
- }
-
- private static String namePattern(String groupName) {
- return Pattern.compile(Pattern.quote(groupName)) + "Templates.*";
- }
-
- private void verifyRefactoring(String groupName, String templateNamePattern) {
- createRestrictedRefactoringTestHelper(templateNamePattern)
- .addInput(groupName + "TemplatesTestInput.java")
- .addOutput(groupName + "TemplatesTestOutput.java")
- .doTest(TestMode.TEXT_MATCH);
- }
-
- private BugCheckerRefactoringTestHelper createRestrictedRefactoringTestHelper(
- String namePattern) {
- return BugCheckerRefactoringTestHelper.newInstance(
- Refaster.class, getRefasterTemplateCollectionClass())
- .setArgs("-XepOpt:Refaster:NamePattern=" + namePattern);
- }
-
- /**
- * Returns an arbitrary Refaster template collection class inside the {@code
- * tech.picnic.errorprone.refastertemplates} package, enabling {@link
- * BugCheckerRefactoringTestHelper} to load test resources from said package.
- */
- private Class> getRefasterTemplateCollectionClass() {
- try {
- return Class.forName(
- "tech.picnic.errorprone.refastertemplates.AssortedTemplates",
- /* initialize= */ false,
- getClass().getClassLoader());
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Failed to load Refaster template collection class", e);
- }
- }
-}
diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/refastertemplates/RefasterTemplatesTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/refastertemplates/RefasterTemplatesTest.java
new file mode 100644
index 00000000000..7b78e494757
--- /dev/null
+++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/refastertemplates/RefasterTemplatesTest.java
@@ -0,0 +1,81 @@
+package tech.picnic.errorprone.refastertemplates;
+
+import static java.util.function.Predicate.not;
+
+import com.google.common.collect.ImmutableSet;
+import java.util.stream.Stream;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateCollection;
+
+final class RefasterTemplatesTest {
+ /** The names of all Refaster template groups defined in this module. */
+ private static final ImmutableSet> TEMPLATE_COLLECTIONS =
+ ImmutableSet.of(
+ AssertJTemplates.class,
+ AssertJBigDecimalTemplates.class,
+ AssertJBigIntegerTemplates.class,
+ AssertJBooleanTemplates.class,
+ AssertJByteTemplates.class,
+ AssertJCharSequenceTemplates.class,
+ AssertJDoubleTemplates.class,
+ AssertJEnumerableTemplates.class,
+ AssertJFloatTemplates.class,
+ AssertJIntegerTemplates.class,
+ AssertJLongTemplates.class,
+ AssertJNumberTemplates.class,
+ AssertJMapTemplates.class,
+ AssertJObjectTemplates.class,
+ AssertJOptionalTemplates.class,
+ AssertJShortTemplates.class,
+ AssertJStringTemplates.class,
+ AssertJThrowingCallableTemplates.class,
+ AssortedTemplates.class,
+ BigDecimalTemplates.class,
+ CollectionTemplates.class,
+ ComparatorTemplates.class,
+ DoubleStreamTemplates.class,
+ EqualityTemplates.class,
+ ImmutableListTemplates.class,
+ ImmutableListMultimapTemplates.class,
+ ImmutableMapTemplates.class,
+ ImmutableMultisetTemplates.class,
+ ImmutableSetTemplates.class,
+ ImmutableSetMultimapTemplates.class,
+ ImmutableSortedMapTemplates.class,
+ ImmutableSortedMultisetTemplates.class,
+ ImmutableSortedSetTemplates.class,
+ IntStreamTemplates.class,
+ JUnitTemplates.class,
+ LongStreamTemplates.class,
+ MapEntryTemplates.class,
+ MockitoTemplates.class,
+ MultimapTemplates.class,
+ NullTemplates.class,
+ OptionalTemplates.class,
+ PrimitiveTemplates.class,
+ ReactorTemplates.class,
+ RxJava2AdapterTemplates.class,
+ StreamTemplates.class,
+ StringTemplates.class,
+ TestNGToAssertJTemplates.class,
+ TimeTemplates.class,
+ WebClientTemplates.class);
+
+ // XXX: Create a JUnit extension to automatically discover the template collections in a given
+ // context to make sure the list is exhaustive.
+ private static Stream validateTemplateCollectionTestCases() {
+ // XXX: Drop the filter once we have added tests for AssertJ! We can then also replace this
+ // method with `@ValueSource(classes = {...})`.
+ return TEMPLATE_COLLECTIONS.stream()
+ .filter(not(AssertJTemplates.class::equals))
+ .map(Arguments::arguments);
+ }
+
+ @MethodSource("validateTemplateCollectionTestCases")
+ @ParameterizedTest
+ void validateTemplateCollection(Class> clazz) {
+ RefasterTemplateCollection.validate(clazz);
+ }
+}
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigDecimalTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigDecimalTemplatesTestInput.java
index 370a6cf13be..c8ecc2ecb8b 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigDecimalTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigDecimalTemplatesTestInput.java
@@ -7,6 +7,7 @@
import com.google.common.collect.ImmutableSet;
import java.math.BigDecimal;
import org.assertj.core.api.AbstractBigDecimalAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJBigDecimalTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigDecimalTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigDecimalTemplatesTestOutput.java
index c3cb6e3f251..9807aa54882 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigDecimalTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigDecimalTemplatesTestOutput.java
@@ -7,6 +7,7 @@
import com.google.common.collect.ImmutableSet;
import java.math.BigDecimal;
import org.assertj.core.api.AbstractBigDecimalAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJBigDecimalTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigIntegerTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigIntegerTemplatesTestInput.java
index 7aab3da7161..3bbbcf0380f 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigIntegerTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigIntegerTemplatesTestInput.java
@@ -7,6 +7,7 @@
import com.google.common.collect.ImmutableSet;
import java.math.BigInteger;
import org.assertj.core.api.AbstractBigIntegerAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJBigIntegerTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigIntegerTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigIntegerTemplatesTestOutput.java
index 9106ecdcb21..9674b649ddf 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigIntegerTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBigIntegerTemplatesTestOutput.java
@@ -7,6 +7,7 @@
import com.google.common.collect.ImmutableSet;
import java.math.BigInteger;
import org.assertj.core.api.AbstractBigIntegerAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJBigIntegerTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBooleanTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBooleanTemplatesTestInput.java
index 1193dc6f0dd..9181a582470 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBooleanTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBooleanTemplatesTestInput.java
@@ -4,6 +4,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractBooleanAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJBooleanTemplatesTest implements RefasterTemplateTestCase {
AbstractBooleanAssert> testAbstractBooleanAssertIsEqualTo() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBooleanTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBooleanTemplatesTestOutput.java
index 110a421c280..da458b13b9c 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBooleanTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJBooleanTemplatesTestOutput.java
@@ -4,6 +4,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractBooleanAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJBooleanTemplatesTest implements RefasterTemplateTestCase {
AbstractBooleanAssert> testAbstractBooleanAssertIsEqualTo() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJByteTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJByteTemplatesTestInput.java
index 5c0e7a78342..f9a7b2607e0 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJByteTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJByteTemplatesTestInput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractByteAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJByteTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJByteTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJByteTemplatesTestOutput.java
index 6bf32501429..ea274127a4f 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJByteTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJByteTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractByteAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJByteTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJCharSequenceTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJCharSequenceTemplatesTestInput.java
index 5a71e7a6a85..3cad90b1a0d 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJCharSequenceTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJCharSequenceTemplatesTestInput.java
@@ -4,6 +4,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJCharSequenceTemplatesTest implements RefasterTemplateTestCase {
void testAssertThatCharSequenceIsEmpty() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJCharSequenceTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJCharSequenceTemplatesTestOutput.java
index 6395d7258ae..9d0fc29bb37 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJCharSequenceTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJCharSequenceTemplatesTestOutput.java
@@ -4,6 +4,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJCharSequenceTemplatesTest implements RefasterTemplateTestCase {
void testAssertThatCharSequenceIsEmpty() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJDoubleTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJDoubleTemplatesTestInput.java
index 95fb107dbfd..04eb0c7206b 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJDoubleTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJDoubleTemplatesTestInput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractDoubleAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJDoubleTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJDoubleTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJDoubleTemplatesTestOutput.java
index d657c3dde86..12ec9c93be3 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJDoubleTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJDoubleTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractDoubleAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJDoubleTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJEnumerableTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJEnumerableTemplatesTestInput.java
index 693fd1c4aff..7374a993eb7 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJEnumerableTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJEnumerableTemplatesTestInput.java
@@ -5,6 +5,7 @@
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import org.assertj.core.api.EnumerableAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJEnumableTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJEnumerableTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJEnumerableTemplatesTestOutput.java
index 5b7e9013e49..598a38168f4 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJEnumerableTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJEnumerableTemplatesTestOutput.java
@@ -5,6 +5,7 @@
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import org.assertj.core.api.EnumerableAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJEnumableTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJFloatTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJFloatTemplatesTestInput.java
index 88ced7b924b..54b4fac623d 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJFloatTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJFloatTemplatesTestInput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractFloatAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJFloatTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJFloatTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJFloatTemplatesTestOutput.java
index 01dc692db70..40b96263722 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJFloatTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJFloatTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractFloatAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJFloatTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJIntegerTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJIntegerTemplatesTestInput.java
index 320496d205b..6b4b7a38c35 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJIntegerTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJIntegerTemplatesTestInput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractIntegerAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJIntegerTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJIntegerTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJIntegerTemplatesTestOutput.java
index da912f04e37..87613912fff 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJIntegerTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJIntegerTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractIntegerAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJIntegerTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJLongTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJLongTemplatesTestInput.java
index cee37b22275..b55a52774fc 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJLongTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJLongTemplatesTestInput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractLongAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJLongTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJLongTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJLongTemplatesTestOutput.java
index 5a54440edfb..1c7a851983d 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJLongTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJLongTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractLongAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJLongTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJMapTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJMapTemplatesTestInput.java
index 020b18a4765..84d9fb02d3f 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJMapTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJMapTemplatesTestInput.java
@@ -4,6 +4,7 @@
import com.google.common.collect.ImmutableMap;
import org.assertj.core.api.AbstractMapAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJMapTemplatesTest implements RefasterTemplateTestCase {
AbstractMapAssert, ?, Integer, Integer>
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJMapTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJMapTemplatesTestOutput.java
index ff2a7711516..65d1a3b4cb4 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJMapTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJMapTemplatesTestOutput.java
@@ -4,6 +4,7 @@
import com.google.common.collect.ImmutableMap;
import org.assertj.core.api.AbstractMapAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJMapTemplatesTest implements RefasterTemplateTestCase {
AbstractMapAssert, ?, Integer, Integer>
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJNumberTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJNumberTemplatesTestInput.java
index 22193c9dcdf..d92b1cdf14d 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJNumberTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJNumberTemplatesTestInput.java
@@ -6,6 +6,7 @@
import java.math.BigDecimal;
import java.math.BigInteger;
import org.assertj.core.api.NumberAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJNumberTemplatesTest implements RefasterTemplateTestCase {
ImmutableSet> testNumberAssertIsPositive() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJNumberTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJNumberTemplatesTestOutput.java
index a01f1b490fb..72b9f27ce45 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJNumberTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJNumberTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import java.math.BigDecimal;
import java.math.BigInteger;
import org.assertj.core.api.NumberAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJNumberTemplatesTest implements RefasterTemplateTestCase {
ImmutableSet> testNumberAssertIsPositive() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJObjectTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJObjectTemplatesTestInput.java
index 521143a5012..391c6b1228d 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJObjectTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJObjectTemplatesTestInput.java
@@ -3,6 +3,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import org.assertj.core.api.AbstractAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJObjectTemplatesTest implements RefasterTemplateTestCase {
AbstractAssert, ?> testAssertThatIsInstanceOf() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJObjectTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJObjectTemplatesTestOutput.java
index 35a273a7d03..3e68603b4a5 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJObjectTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJObjectTemplatesTestOutput.java
@@ -3,6 +3,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import org.assertj.core.api.AbstractAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJObjectTemplatesTest implements RefasterTemplateTestCase {
AbstractAssert, ?> testAssertThatIsInstanceOf() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJOptionalTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJOptionalTemplatesTestInput.java
index 86f91856b54..ca6be8ec0bc 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJOptionalTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJOptionalTemplatesTestInput.java
@@ -6,6 +6,7 @@
import java.util.Optional;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.OptionalAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJOptionalTemplatesTest implements RefasterTemplateTestCase {
AbstractAssert, ?> testAssertThatOptional() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJOptionalTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJOptionalTemplatesTestOutput.java
index 29bb84d5766..df5f706c319 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJOptionalTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJOptionalTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import java.util.Optional;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.OptionalAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJOptionalTemplatesTest implements RefasterTemplateTestCase {
AbstractAssert, ?> testAssertThatOptional() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJShortTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJShortTemplatesTestInput.java
index c79f5d2f8ff..e4fc7393733 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJShortTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJShortTemplatesTestInput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractShortAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJShortTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJShortTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJShortTemplatesTestOutput.java
index d051c080341..58beb71e241 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJShortTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJShortTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractShortAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJShortTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJStringTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJStringTemplatesTestInput.java
index 4023eb1f60c..e699740a836 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJStringTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJStringTemplatesTestInput.java
@@ -4,6 +4,7 @@
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.AbstractStringAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJStringTemplatesTest implements RefasterTemplateTestCase {
void testAbstractStringAssertStringIsEmpty() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJStringTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJStringTemplatesTestOutput.java
index 759b00f0cbc..1e048f94a2b 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJStringTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJStringTemplatesTestOutput.java
@@ -4,6 +4,7 @@
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.AbstractStringAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJStringTemplatesTest implements RefasterTemplateTestCase {
void testAbstractStringAssertStringIsEmpty() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplatesTestInput.java
index 0847ef23934..e3edffd7975 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplatesTestInput.java
@@ -10,6 +10,7 @@
import com.google.common.collect.ImmutableSet;
import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.api.AbstractThrowableAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJThrowingCallableTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplatesTestOutput.java
index 04ad44edad4..38ba2a2ec49 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplatesTestOutput.java
@@ -11,6 +11,7 @@
import java.io.IOException;
import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.api.AbstractThrowableAssert;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssertJThrowingCallableTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssortedTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssortedTemplatesTestInput.java
index efa49a9753c..d4023e45465 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssortedTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssortedTemplatesTestInput.java
@@ -17,6 +17,7 @@
import java.util.HashSet;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssortedTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssortedTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssortedTemplatesTestOutput.java
index ea929861317..10809a71341 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssortedTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssortedTemplatesTestOutput.java
@@ -21,6 +21,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class AssortedTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/BigDecimalTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/BigDecimalTemplatesTestInput.java
index 8ccae257f3a..878b1bac289 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/BigDecimalTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/BigDecimalTemplatesTestInput.java
@@ -2,6 +2,7 @@
import com.google.common.collect.ImmutableSet;
import java.math.BigDecimal;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class BigDecimalTemplatesTest implements RefasterTemplateTestCase {
ImmutableSet testBigDecimalZero() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/BigDecimalTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/BigDecimalTemplatesTestOutput.java
index e92630e76ad..1a379ce9f7d 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/BigDecimalTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/BigDecimalTemplatesTestOutput.java
@@ -2,6 +2,7 @@
import com.google.common.collect.ImmutableSet;
import java.math.BigDecimal;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class BigDecimalTemplatesTest implements RefasterTemplateTestCase {
ImmutableSet testBigDecimalZero() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/CollectionTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/CollectionTemplatesTestInput.java
index ac952b70d03..a5316647c5b 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/CollectionTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/CollectionTemplatesTestInput.java
@@ -11,6 +11,7 @@
import java.util.Optional;
import java.util.TreeSet;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class CollectionTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/CollectionTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/CollectionTemplatesTestOutput.java
index 51807141d4d..592621b77be 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/CollectionTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/CollectionTemplatesTestOutput.java
@@ -11,6 +11,7 @@
import java.util.Optional;
import java.util.TreeSet;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class CollectionTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ComparatorTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ComparatorTemplatesTestInput.java
index 406b1da7b39..39c10f8add6 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ComparatorTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ComparatorTemplatesTestInput.java
@@ -8,6 +8,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ComparatorTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ComparatorTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ComparatorTemplatesTestOutput.java
index 77da76b2229..366da201397 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ComparatorTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ComparatorTemplatesTestOutput.java
@@ -10,6 +10,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ComparatorTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/DoubleStreamTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/DoubleStreamTemplatesTestInput.java
index fe202059721..37bd64f8f70 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/DoubleStreamTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/DoubleStreamTemplatesTestInput.java
@@ -6,6 +6,7 @@
import java.util.function.DoublePredicate;
import java.util.stream.DoubleStream;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class DoubleStreamTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/DoubleStreamTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/DoubleStreamTemplatesTestOutput.java
index 75b0e8993f8..de39e49000a 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/DoubleStreamTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/DoubleStreamTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import java.util.function.DoublePredicate;
import java.util.stream.DoubleStream;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class DoubleStreamTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/EqualityTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/EqualityTemplatesTestInput.java
index f331f885866..f8299fc8adb 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/EqualityTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/EqualityTemplatesTestInput.java
@@ -5,6 +5,7 @@
import java.math.RoundingMode;
import java.util.Objects;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class EqualityTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/EqualityTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/EqualityTemplatesTestOutput.java
index c5ac5311913..f142f465f12 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/EqualityTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/EqualityTemplatesTestOutput.java
@@ -5,6 +5,7 @@
import java.math.RoundingMode;
import java.util.Objects;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class EqualityTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListMultimapTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListMultimapTemplatesTestInput.java
index be01cdaf0e7..f840b67d173 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListMultimapTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListMultimapTemplatesTestInput.java
@@ -16,6 +16,7 @@
import com.google.common.collect.TreeMultimap;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableListMultimapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListMultimapTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListMultimapTemplatesTestOutput.java
index cdbb663ea82..7f7e7888b0a 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListMultimapTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListMultimapTemplatesTestOutput.java
@@ -16,6 +16,7 @@
import com.google.common.collect.TreeMultimap;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableListMultimapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListTemplatesTestInput.java
index 1a93261fd88..0afd20b0e1c 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListTemplatesTestInput.java
@@ -11,6 +11,7 @@
import java.util.Comparator;
import java.util.List;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableListTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListTemplatesTestOutput.java
index 1ba66ba42e4..915ab1e1df6 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableListTemplatesTestOutput.java
@@ -12,6 +12,7 @@
import java.util.Comparator;
import java.util.List;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableListTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMapTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMapTemplatesTestInput.java
index 5995d955d73..b2667b9f586 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMapTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMapTemplatesTestInput.java
@@ -12,6 +12,7 @@
import java.util.Collections;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableMapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMapTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMapTemplatesTestOutput.java
index 36d7b5bdae3..77153c74667 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMapTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMapTemplatesTestOutput.java
@@ -12,6 +12,7 @@
import java.util.Collections;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableMapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMultisetTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMultisetTemplatesTestInput.java
index ef50b18791b..92f4ed84f19 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMultisetTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMultisetTemplatesTestInput.java
@@ -8,6 +8,7 @@
import com.google.common.collect.Streams;
import java.util.Arrays;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableMultisetTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMultisetTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMultisetTemplatesTestOutput.java
index 6004eafaf4d..84f5122d846 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMultisetTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableMultisetTemplatesTestOutput.java
@@ -8,6 +8,7 @@
import com.google.common.collect.Streams;
import java.util.Arrays;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableMultisetTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetMultimapTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetMultimapTemplatesTestInput.java
index 3d3ac31850a..2f2cd08f0c9 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetMultimapTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetMultimapTemplatesTestInput.java
@@ -13,6 +13,7 @@
import com.google.common.collect.TreeMultimap;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSetMultimapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetMultimapTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetMultimapTemplatesTestOutput.java
index 647d9b96b32..f887977a8b8 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetMultimapTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetMultimapTemplatesTestOutput.java
@@ -13,6 +13,7 @@
import com.google.common.collect.TreeMultimap;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSetMultimapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplatesTestInput.java
index 29891c942b1..d2b38ad2acf 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplatesTestInput.java
@@ -10,6 +10,7 @@
import java.util.Collections;
import java.util.Set;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSetTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplatesTestOutput.java
index 3943f5908fd..e6ad2e44adb 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplatesTestOutput.java
@@ -10,6 +10,7 @@
import java.util.Collections;
import java.util.Set;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSetTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMapTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMapTemplatesTestInput.java
index 1443707ece9..a2df4ae2b0b 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMapTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMapTemplatesTestInput.java
@@ -10,6 +10,7 @@
import java.util.Comparator;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSortedMapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMapTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMapTemplatesTestOutput.java
index 98c212f89fe..7f394fa1f18 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMapTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMapTemplatesTestOutput.java
@@ -10,6 +10,7 @@
import java.util.Comparator;
import java.util.Map;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSortedMapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMultisetTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMultisetTemplatesTestInput.java
index f42fd532116..085fb1e8c67 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMultisetTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMultisetTemplatesTestInput.java
@@ -11,6 +11,7 @@
import java.util.Arrays;
import java.util.Comparator;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSortedMultisetTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMultisetTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMultisetTemplatesTestOutput.java
index 818a9331542..843c2922e6a 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMultisetTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedMultisetTemplatesTestOutput.java
@@ -11,6 +11,7 @@
import java.util.Arrays;
import java.util.Comparator;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSortedMultisetTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedSetTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedSetTemplatesTestInput.java
index 02181575c0e..4a90a874573 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedSetTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedSetTemplatesTestInput.java
@@ -10,6 +10,7 @@
import java.util.Arrays;
import java.util.Comparator;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSortedSetTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedSetTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedSetTemplatesTestOutput.java
index 2d696c95fe4..b944a2ef319 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedSetTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ImmutableSortedSetTemplatesTestOutput.java
@@ -10,6 +10,7 @@
import java.util.Arrays;
import java.util.Comparator;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ImmutableSortedSetTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/IntStreamTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/IntStreamTemplatesTestInput.java
index fe7d93763d2..03cf380352a 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/IntStreamTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/IntStreamTemplatesTestInput.java
@@ -6,6 +6,7 @@
import java.util.function.IntPredicate;
import java.util.stream.IntStream;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class IntStreamTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/IntStreamTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/IntStreamTemplatesTestOutput.java
index 30260b53d6e..c40930f27a6 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/IntStreamTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/IntStreamTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import java.util.function.IntPredicate;
import java.util.stream.IntStream;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class IntStreamTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/JUnitTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/JUnitTemplatesTestInput.java
index 88d26b05f4e..77c83e8916e 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/JUnitTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/JUnitTemplatesTestInput.java
@@ -2,6 +2,7 @@
import com.google.common.collect.ImmutableSet;
import org.junit.jupiter.params.provider.Arguments;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class JUnitTemplatesTest implements RefasterTemplateTestCase {
ImmutableSet testArgumentsEnumeration() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/JUnitTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/JUnitTemplatesTestOutput.java
index 6e8e77582c0..13151144b22 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/JUnitTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/JUnitTemplatesTestOutput.java
@@ -4,6 +4,7 @@
import com.google.common.collect.ImmutableSet;
import org.junit.jupiter.params.provider.Arguments;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class JUnitTemplatesTest implements RefasterTemplateTestCase {
ImmutableSet testArgumentsEnumeration() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/LongStreamTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/LongStreamTemplatesTestInput.java
index fd284c65fe1..51a32a1d3a2 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/LongStreamTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/LongStreamTemplatesTestInput.java
@@ -6,6 +6,7 @@
import java.util.function.LongPredicate;
import java.util.stream.LongStream;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class LongStreamTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/LongStreamTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/LongStreamTemplatesTestOutput.java
index 6b1b54229ac..c87219b7fde 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/LongStreamTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/LongStreamTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import java.util.function.LongPredicate;
import java.util.stream.LongStream;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class LongStreamTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MapEntryTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MapEntryTemplatesTestInput.java
index c9203ab5ee4..e829d26833d 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MapEntryTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MapEntryTemplatesTestInput.java
@@ -5,6 +5,7 @@
import java.util.AbstractMap;
import java.util.Comparator;
import java.util.Map;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class MapEntryTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MapEntryTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MapEntryTemplatesTestOutput.java
index bf1327aeb7e..056bb169eec 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MapEntryTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MapEntryTemplatesTestOutput.java
@@ -8,6 +8,7 @@
import java.util.AbstractMap;
import java.util.Comparator;
import java.util.Map;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class MapEntryTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MockitoTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MockitoTemplatesTestInput.java
index 676a15f5c10..f48eec9c488 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MockitoTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MockitoTemplatesTestInput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import org.mockito.verification.VerificationMode;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class MockitoTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MockitoTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MockitoTemplatesTestOutput.java
index 258fab726a8..367ffba744a 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MockitoTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MockitoTemplatesTestOutput.java
@@ -7,6 +7,7 @@
import com.google.common.collect.ImmutableSet;
import org.mockito.verification.VerificationMode;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class MockitoTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MultimapTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MultimapTemplatesTestInput.java
index 5528056bbd9..3348249ba72 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MultimapTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MultimapTemplatesTestInput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.Multimaps;
import java.util.Collection;
import java.util.Set;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class MultimapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MultimapTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MultimapTemplatesTestOutput.java
index 5c027237fb1..0aeab3fc01a 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MultimapTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/MultimapTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.Multimaps;
import java.util.Collection;
import java.util.Set;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class MultimapTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/NullTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/NullTemplatesTestInput.java
index 7b28ad4ae0b..ac02a7b084c 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/NullTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/NullTemplatesTestInput.java
@@ -3,6 +3,7 @@
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class NullTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/NullTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/NullTemplatesTestOutput.java
index cda3ab9634c..617aa31dbc1 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/NullTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/NullTemplatesTestOutput.java
@@ -6,6 +6,7 @@
import com.google.common.collect.ImmutableSet;
import java.util.Objects;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class NullTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/OptionalTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/OptionalTemplatesTestInput.java
index a954478eb0f..d32ba426d2f 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/OptionalTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/OptionalTemplatesTestInput.java
@@ -5,6 +5,7 @@
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class OptionalTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/OptionalTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/OptionalTemplatesTestOutput.java
index 100d8aca288..d7e4f8573f3 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/OptionalTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/OptionalTemplatesTestOutput.java
@@ -7,6 +7,7 @@
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class OptionalTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/PrimitiveTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/PrimitiveTemplatesTestInput.java
index 1580b6063ad..d41931b501a 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/PrimitiveTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/PrimitiveTemplatesTestInput.java
@@ -2,6 +2,7 @@
import com.google.common.collect.ImmutableSet;
import com.google.common.primitives.Ints;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class PrimitiveTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/PrimitiveTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/PrimitiveTemplatesTestOutput.java
index 91caf7c011e..ba2647ad838 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/PrimitiveTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/PrimitiveTemplatesTestOutput.java
@@ -2,6 +2,7 @@
import com.google.common.collect.ImmutableSet;
import com.google.common.primitives.Ints;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class PrimitiveTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ReactorTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ReactorTemplatesTestInput.java
index ca0bd1d4861..0fc64f7670d 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ReactorTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ReactorTemplatesTestInput.java
@@ -11,6 +11,7 @@
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
import reactor.test.publisher.PublisherProbe;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ReactorTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ReactorTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ReactorTemplatesTestOutput.java
index 90f73ae0baa..18fd8b92b96 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ReactorTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/ReactorTemplatesTestOutput.java
@@ -12,6 +12,7 @@
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
import reactor.test.publisher.PublisherProbe;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class ReactorTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/RxJava2AdapterTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/RxJava2AdapterTemplatesTestInput.java
index 7169ebfb981..42fc8b73c67 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/RxJava2AdapterTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/RxJava2AdapterTemplatesTestInput.java
@@ -12,6 +12,7 @@
import reactor.adapter.rxjava.RxJava2Adapter;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class RxJava2AdapterTemplatesTest implements RefasterTemplateTestCase {
ImmutableSet> testCompletableToMono() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/RxJava2AdapterTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/RxJava2AdapterTemplatesTestOutput.java
index 4a523d60e66..6ad29808901 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/RxJava2AdapterTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/RxJava2AdapterTemplatesTestOutput.java
@@ -12,6 +12,7 @@
import reactor.adapter.rxjava.RxJava2Adapter;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class RxJava2AdapterTemplatesTest implements RefasterTemplateTestCase {
ImmutableSet> testCompletableToMono() {
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StreamTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StreamTemplatesTestInput.java
index 2384fa9409d..f59538c6b05 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StreamTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StreamTemplatesTestInput.java
@@ -11,6 +11,7 @@
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class StreamTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StreamTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StreamTemplatesTestOutput.java
index 071f789045d..c41746138d6 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StreamTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StreamTemplatesTestOutput.java
@@ -13,6 +13,7 @@
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class StreamTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StringTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StringTemplatesTestInput.java
index 3d2b50ec316..bbf600371af 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StringTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StringTemplatesTestInput.java
@@ -12,6 +12,7 @@
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class StringTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StringTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StringTemplatesTestOutput.java
index 4f9067c88c4..b37280462f2 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StringTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/StringTemplatesTestOutput.java
@@ -13,6 +13,7 @@
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Stream;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class StringTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TestNGToAssertJTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TestNGToAssertJTemplatesTestInput.java
index 67bc31e03cf..34d0a9fd485 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TestNGToAssertJTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TestNGToAssertJTemplatesTestInput.java
@@ -17,6 +17,7 @@
import com.google.common.collect.Iterators;
import java.util.ArrayList;
import java.util.Collections;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class TestNGToAssertJTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TestNGToAssertJTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TestNGToAssertJTemplatesTestOutput.java
index 8e10a5ef06a..496620306b8 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TestNGToAssertJTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TestNGToAssertJTemplatesTestOutput.java
@@ -22,6 +22,7 @@
import com.google.common.collect.Iterators;
import java.util.ArrayList;
import java.util.Collections;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class TestNGToAssertJTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TimeTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TimeTemplatesTestInput.java
index f212564c56f..09060a69b19 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TimeTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TimeTemplatesTestInput.java
@@ -13,6 +13,7 @@
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class TimeTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TimeTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TimeTemplatesTestOutput.java
index b4215e599bf..215c93fe8c5 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TimeTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/TimeTemplatesTestOutput.java
@@ -13,6 +13,7 @@
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class TimeTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/WebClientTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/WebClientTemplatesTestInput.java
index fd33f65edb4..323899bb315 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/WebClientTemplatesTestInput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/WebClientTemplatesTestInput.java
@@ -11,6 +11,7 @@
import com.google.common.collect.ImmutableSet;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.reactive.function.client.WebClient;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class WebClientTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/WebClientTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/WebClientTemplatesTestOutput.java
index 4f3685963db..9e0d57831d1 100644
--- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/WebClientTemplatesTestOutput.java
+++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/WebClientTemplatesTestOutput.java
@@ -11,6 +11,7 @@
import com.google.common.collect.ImmutableSet;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.reactive.function.client.WebClient;
+import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase;
final class WebClientTemplatesTest implements RefasterTemplateTestCase {
@Override
diff --git a/pom.xml b/pom.xml
index 6f5b26279f4..e4759671fef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,9 @@
error-prone-contrib
refaster-compiler
+ refaster-runner
refaster-support
+ refaster-test-support
@@ -196,11 +198,21 @@
refaster-compiler
${project.version}