Remove javaFixtureFactory

Replaces uses of javaFixtureFactory with prepareForJavaTest and removes
the unused javaFixtureFactory.

Bug: 182885307
Test: m nothing
Change-Id: I809772d14af2af211b9e15ad676fbdc06b07cd46
diff --git a/java/app_test.go b/java/app_test.go
index 609ddf1..2523533 100644
--- a/java/app_test.go
+++ b/java/app_test.go
@@ -29,14 +29,14 @@
 	"android/soong/genrule"
 )
 
-// testApp runs tests using the javaFixtureFactory
+// testApp runs tests using the prepareForJavaTest
 //
 // See testJava for an explanation as to how to stop using this deprecated method.
 //
 // deprecated
 func testApp(t *testing.T, bp string) *android.TestContext {
 	t.Helper()
-	result := javaFixtureFactory.RunTestWithBp(t, bp)
+	result := prepareForJavaTest.RunTestWithBp(t, bp)
 	return result.TestContext
 }
 
@@ -55,7 +55,8 @@
 
 	for _, moduleType := range []string{"android_app", "android_library"} {
 		t.Run(moduleType, func(t *testing.T) {
-			result := javaFixtureFactory.Extend(
+			result := android.GroupFixturePreparers(
+				prepareForJavaTest,
 				android.FixtureModifyMockFS(func(fs android.MockFS) {
 					for _, file := range resourceFiles {
 						fs[file] = nil
@@ -364,8 +365,8 @@
 			if test.expectedError != "" {
 				errorHandler = android.FixtureExpectsAtLeastOneErrorMatchingPattern(test.expectedError)
 			}
-			javaFixtureFactory.
-				Extend(FixtureWithPrebuiltApis(map[string][]string{
+			android.GroupFixturePreparers(
+				prepareForJavaTest, FixtureWithPrebuiltApis(map[string][]string{
 					"29": {"foo"},
 				})).
 				ExtendWithErrorHandler(errorHandler).RunTestWithBp(t, test.bp)
@@ -1063,7 +1064,8 @@
 					%s
 				}`, moduleType, test.sdkVersion, platformApiProp)
 
-				result := javaFixtureFactory.Extend(
+				result := android.GroupFixturePreparers(
+					prepareForJavaTest,
 					android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
 						variables.Platform_sdk_version = &test.platformSdkInt
 						variables.Platform_sdk_codename = &test.platformSdkCodename
@@ -1131,7 +1133,8 @@
 						vendor: true,
 					}`, moduleType, sdkKind, test.sdkVersion)
 
-					result := javaFixtureFactory.Extend(
+					result := android.GroupFixturePreparers(
+						prepareForJavaTest,
 						android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
 							variables.Platform_sdk_version = &test.platformSdkInt
 							variables.Platform_sdk_codename = &test.platformSdkCodename
@@ -2331,7 +2334,8 @@
 		}
 	`
 
-	result := javaFixtureFactory.Extend(
+	result := android.GroupFixturePreparers(
+		prepareForJavaTest,
 		PrepareForTestWithJavaSdkLibraryFiles,
 		FixtureWithLastReleaseApis("runtime-library", "foo", "quuz", "qux", "bar", "fred"),
 		android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
@@ -2681,7 +2685,8 @@
 	test := func(t *testing.T, bp string, want bool, unbundled bool) {
 		t.Helper()
 
-		result := javaFixtureFactory.Extend(
+		result := android.GroupFixturePreparers(
+			prepareForJavaTest,
 			PrepareForTestWithPrebuiltsOfCurrentApi,
 			android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
 				if unbundled {