Simplify some tests in AssistedDialingMediatorImplTest

Some one-line tests that verify an expected Exception is thrown can be
simplified using the @Test(expected = SomeException.class) feature.

Test: make Run_TeleService_robotests
Change-Id: I9fbbc876ca04fbac949cf2fe07755013c8b133f7
diff --git a/tests/robotests/src/com/android/phone/assisteddialing/AssistedDialingMediatorImplTest.java b/tests/robotests/src/com/android/phone/assisteddialing/AssistedDialingMediatorImplTest.java
index fd90004..3d4d0e8 100644
--- a/tests/robotests/src/com/android/phone/assisteddialing/AssistedDialingMediatorImplTest.java
+++ b/tests/robotests/src/com/android/phone/assisteddialing/AssistedDialingMediatorImplTest.java
@@ -50,31 +50,19 @@
   private final AssistedDialingMediator mAssistedDialingMediator =
       new AssistedDialingMediatorImpl(mLocationDetector, mNumberTransformer);
 
-  @Test
+  @Test(expected = NullPointerException.class)
   public void testConstructorThrows_allParametersNull() {
-    try {
-      new AssistedDialingMediatorImpl(null, null);
-    } catch (NullPointerException expected) {
-      // expected
-    }
+    new AssistedDialingMediatorImpl(null, null);
   }
 
-  @Test
+  @Test(expected = NullPointerException.class)
   public void testConstructorThrows_locationDetectorNull() {
-    try {
-      new AssistedDialingMediatorImpl(null, mNumberTransformer);
-    } catch (NullPointerException expected) {
-      // expected
-    }
+    new AssistedDialingMediatorImpl(null, mNumberTransformer);
   }
 
-  @Test
+  @Test(expected = NullPointerException.class)
   public void testConstructorThrows_numberTransformerNull() {
-    try {
-      new AssistedDialingMediatorImpl(mLocationDetector, null);
-    } catch (NullPointerException expected) {
-      // expected
-    }
+    new AssistedDialingMediatorImpl(mLocationDetector, null);
   }
 
   @Test