Add automatic exec groups inside java_common.compile

java_common.compile potentially creates 5 actions. I've added AEG to each of them (some with 'setExecGroup' and some with `setOwner`, depending on which kind of Action class they support).

I've also added tests which cover all those 5 actions, when AEG are enabled and when are disabled.

For more information about AEG, check https://docs.google.com/document/d/1-rbP_hmKs9D639YWw5F_JyxPxL2bi6dSmmvj_WXak9M/edit#heading=h.5mcn15i0e1ch.

PiperOrigin-RevId: 508660121
Change-Id: I680314c9fad12b107b6d1c3f028f0864b733cb79
diff --git a/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java b/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
index c206106..a4967e3 100644
--- a/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
+++ b/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
@@ -164,6 +164,9 @@
   public static final String PROGUARD_ALLOWLISTER_TARGET =
       "@bazel_tools//tools/jdk:proguard_whitelister";
 
+  /** The java toolchain type. */
+  public static final String JAVA_TOOLCHAIN_TYPE = "@bazel_tools//tools/jdk:toolchain_type";
+
   /** A choice of test execution mode, only varies internally. */
   public enum InternalTestExecutionMode {
     NORMAL