Switch to IssueExtractor constructor injection to ease mocking

Change-Id: I63c717c7e38f647345598d17f0caa52286454ff9
diff --git a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java
index 98d40be..970d5c4 100644
--- a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java
+++ b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java
@@ -19,11 +19,15 @@
   private static final Logger log = LoggerFactory.getLogger(
       IssueExtractor.class);
 
-  @Inject @GerritServerConfig
-  private Config gerritConfig;
+  private final Config gerritConfig;
+  private final String itsName;
 
-  @Inject @ItsName
-  private String itsName;
+  @Inject
+  IssueExtractor(@GerritServerConfig Config gerritConfig,
+      @ItsName String itsName) {
+    this.gerritConfig = gerritConfig;
+    this.itsName = itsName;
+  }
 
   /**
    * Gets issue ids from a string.