Fix unit tests and compile warnings.

Change-Id: I25f9df121f30182a470f678f9f8afbf3831f45f2
diff --git a/src/com/android/tradefed/device/IDeviceMonitor.java b/src/com/android/tradefed/device/IDeviceMonitor.java
index b49e686..85d34bb 100644
--- a/src/com/android/tradefed/device/IDeviceMonitor.java
+++ b/src/com/android/tradefed/device/IDeviceMonitor.java
@@ -18,7 +18,6 @@
 
 import com.android.ddmlib.IDevice;
 
-import java.util.Collection;
 import java.util.Map;
 
 /**
diff --git a/tests/src/com/android/tradefed/device/StubDeviceMonitor.java b/tests/src/com/android/tradefed/device/StubDeviceMonitor.java
new file mode 100644
index 0000000..c67df66
--- /dev/null
+++ b/tests/src/com/android/tradefed/device/StubDeviceMonitor.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.tradefed.device;
+
+/**
+ * Empty implementation of a {@link IDeviceMonitor}
+ */
+public class StubDeviceMonitor implements IDeviceMonitor {
+
+    @Override
+    public void run() {
+        // ignore
+    }
+
+    @Override
+    public void setDeviceLister(DeviceLister lister) {
+        // ignore
+    }
+
+    @Override
+    public void notifyDeviceStateChange() {
+        // ignore
+    }
+}
diff --git a/tests/src/com/android/tradefed/invoker/TestInvocationTest.java b/tests/src/com/android/tradefed/invoker/TestInvocationTest.java
index d57a996..2339682 100644
--- a/tests/src/com/android/tradefed/invoker/TestInvocationTest.java
+++ b/tests/src/com/android/tradefed/invoker/TestInvocationTest.java
@@ -113,6 +113,8 @@
 
         EasyMock.expect(mMockBuildInfo.getBuildId()).andStubReturn("1");
         EasyMock.expect(mMockBuildInfo.getBuildAttributes()).andStubReturn(EMPTY_MAP);
+        EasyMock.expect(mMockBuildInfo.getBuildBranch()).andStubReturn("branch");
+        EasyMock.expect(mMockBuildInfo.getBuildFlavor()).andStubReturn("flavor");
         EasyMock.expect(mMockBuildInfo.getTestTag()).andStubReturn("");
         // always expect logger initialization and cleanup calls
         mMockLogRegistry.registerLogger(mMockLogger);
diff --git a/tests/src/com/android/tradefed/util/ConditionPriorityBlockingQueueTest.java b/tests/src/com/android/tradefed/util/ConditionPriorityBlockingQueueTest.java
index 5be9b0d..e23a6c8 100644
--- a/tests/src/com/android/tradefed/util/ConditionPriorityBlockingQueueTest.java
+++ b/tests/src/com/android/tradefed/util/ConditionPriorityBlockingQueueTest.java
@@ -285,7 +285,7 @@
             @Override
             public void run() {
                 try {
-                    for (Integer i : queue) {
+                    for (@SuppressWarnings("unused") Integer i : queue) {
                         Thread.sleep(10);
                     }
                 } catch (Throwable t) {