TwitterStaticNativeAdRenderer implements MoPubAdRenderer<StaticNativeAd> { @Override public boolean supports(final BaseNativeAd nativeAd) { return nativeAd instanceof StaticNativeAd; } TwitterStaticNativeAdRenderer();  TwitterStaticNativeAdRenderer(int styleResId); @Override View createAdView(final Context context, final ViewGroup parent); @Override void renderAdView(final View view, final StaticNativeAd staticNativeAd); @Override boolean supports(final BaseNativeAd nativeAd);  }
@Test public void testSupports_withCorrectInstanceOfBaseNativeAd_shouldReturnTrue() throws Exception { assertTrue(twitterStaticNativeAdRenderer.supports(new StaticNativeAd() {})); assertFalse(twitterStaticNativeAdRenderer.supports(mock(BaseNativeAd.class))); }