diff --git a/javatests/dagger/hilt/android/InjectionTest.java b/javatests/dagger/hilt/android/InjectionTest.java index 426fc6d3248..37607822be5 100644 --- a/javatests/dagger/hilt/android/InjectionTest.java +++ b/javatests/dagger/hilt/android/InjectionTest.java @@ -19,7 +19,6 @@ import static androidx.test.core.app.ApplicationProvider.getApplicationContext; import static com.google.common.truth.Truth.assertThat; import static java.lang.annotation.RetentionPolicy.RUNTIME; -import static org.junit.Assert.assertThrows; import static org.junit.Assert.fail; import android.annotation.TargetApi; @@ -438,21 +437,6 @@ public void testViewNoFragmentBindingsWithFragment_fourthConstructor_presentOnTw assertThat(view.activityBinding).isEqualTo(ACTIVITY_BINDING); } - @Test - @Config(sdk = 19) - public void testViewNoFragmentBindingsWithFragment_fourthConstructor_notPresentOnTwenty() { - TestFragment fragment = setupFragment(TestActivity.class, new TestFragment()); - - assertThrows( - NoSuchMethodError.class, - () -> - new TestView( - fragment.getContext(), - /* attrs= */ null, - /* defStyleAttr= */ 0, - /* defStyleRes= */ 0)); - } - @Test public void testServiceInjection() throws Exception { TestService testService = Robolectric.setupService(TestService.class);