Remove emptyFixtureFactory from apex and java

Bug: 183235980
Test: m nothing
Change-Id: I350b45e2f57430fb158f4141a566e75de17208cd
diff --git a/java/java_test.go b/java/java_test.go
index 99a96e1..913ed87 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -48,10 +48,24 @@
 	os.RemoveAll(buildDir)
 }
 
-var emptyFixtureFactory = android.NewFixtureFactory(&buildDir)
+// Legacy factory to use to create fixtures for tests in this package.
+//
+// deprecated: See prepareForJavaTest
+var javaFixtureFactory = android.NewFixtureFactory(
+	&buildDir,
+	prepareForJavaTest,
+)
 
-// Factory to use to create fixtures for tests in this package.
-var javaFixtureFactory = emptyFixtureFactory.Extend(
+// Legacy preparer used for running tests within the java package.
+//
+// This includes everything that was needed to run any test in the java package prior to the
+// introduction of the test fixtures. Tests that are being converted to use fixtures directly
+// rather than through the testJava...() methods should avoid using this and instead use the
+// various preparers directly, using android.GroupFixturePreparers(...) to group them when
+// necessary.
+//
+// deprecated
+var prepareForJavaTest = android.GroupFixturePreparers(
 	genrule.PrepareForTestWithGenRuleBuildComponents,
 	// Get the CC build components but not default modules.
 	cc.PrepareForTestWithCcBuildComponents,
diff --git a/java/platform_compat_config_test.go b/java/platform_compat_config_test.go
index 0c5d001..1ff6ac3 100644
--- a/java/platform_compat_config_test.go
+++ b/java/platform_compat_config_test.go
@@ -21,7 +21,7 @@
 )
 
 func TestPlatformCompatConfig(t *testing.T) {
-	result := emptyFixtureFactory.RunTest(t,
+	result := android.GroupFixturePreparers(
 		PrepareForTestWithPlatformCompatConfig,
 		android.FixtureWithRootAndroidBp(`
 			platform_compat_config {
@@ -34,7 +34,7 @@
 				name: "myconfig3",
 			}
 		`),
-	)
+	).RunTest(t)
 
 	checkMergedCompatConfigInputs(t, result, "myconfig",
 		"out/soong/.intermediates/myconfig1/myconfig1_meta.xml",