NativeResponse { public void prepare(@NonNull final View view) { if (isDestroyed()) { return; } if (!isOverridingClickTracker()) { setOnClickListener(view, new NativeViewClickListener()); } mNativeAd.prepare(view); } NativeResponse(@NonNull final Context context,
            @NonNull final DownloadResponse downloadResponse,
            @NonNull final String adUnitId,
            @NonNull final NativeAdInterface nativeAd,
            @NonNull final MoPubNativeEventListener moPubNativeEventListener); @Override String toString(); @NonNull String getAdUnitId(); @Nullable String getMainImageUrl(); @Nullable String getIconImageUrl(); @Nullable String getClickDestinationUrl(); @Nullable String getCallToAction(); @Nullable String getTitle(); @Nullable String getText(); @NonNull List<String> getImpressionTrackers(); @NonNull String getClickTracker(); @Nullable Double getStarRating(); int getImpressionMinTimeViewed(); int getImpressionMinPercentageViewed(); @Nullable Object getExtra(final String key); @NonNull Map<String, Object> getExtras(); boolean isOverridingImpressionTracker(); boolean isOverridingClickTracker(); void prepare(@NonNull final View view); void recordImpression(@Nullable final View view); void handleClick(@Nullable final View view); void clear(@NonNull final View view); void destroy(); void loadMainImage(@Nullable final ImageView imageView); void loadIconImage(@Nullable final ImageView imageView); void loadExtrasImage(final String key, final ImageView imageView); boolean getRecordedImpression(); boolean isClicked(); boolean isDestroyed(); @Nullable @Deprecated String getSubtitle();  }
@Test public void prepare_shouldCallPrepareOnBaseNativeAd() { subjectWMockBaseNativeAd.prepare(view); verify(mMockNativeAd).prepare(view); }
@Test public void prepare_shouldAttachClickListenersToViewTree() { RelativeLayout relativeLayout = new RelativeLayout(context); Button callToActionView = new Button(context); callToActionView.setId((int) Utils.generateUniqueId()); relativeLayout.addView(callToActionView); assertThat(relativeLayout.performClick()).isFalse(); assertThat(callToActionView.performClick()).isFalse(); subject.prepare(relativeLayout); assertThat(relativeLayout.performClick()).isTrue(); assertThat(callToActionView.performClick()).isTrue(); }