class MoPubCustomEventNative extends CustomEventNative {

    @Override
    protected void loadNativeAd(@NonNull final Context context,
            @NonNull final CustomEventNativeListener customEventNativeListener,
            @NonNull final Map<String, Object> localExtras,
            @NonNull final Map<String, String> serverExtras) {

        final MoPubForwardingNativeAd moPubForwardingNativeAd =
                new MoPubForwardingNativeAd(context.getApplicationContext(),
                        serverExtras.get(RESPONSE_BODY_KEY),
                        customEventNativeListener);

        try {
            moPubForwardingNativeAd.loadAd();
        } catch (IllegalArgumentException e) {
            customEventNativeListener.onNativeAdFailed(NativeErrorCode.UNSPECIFIED);
            MoPubEvents.log(new ErrorEvent.Builder("","").withException(e).build());
        } catch (JSONException e) {
            customEventNativeListener.onNativeAdFailed(NativeErrorCode.INVALID_JSON);
            MoPubEvents.log(new ErrorEvent.Builder("","").withException(e).build());
        }
    }

}