RNInstabugReactnativeModule extends ReactContextBaseJavaModule { @ReactMethod public void show() { MainThreadHandler.runOnMainThread(new Runnable() { @Override public void run() { Instabug.show(); } }); } RNInstabugReactnativeModule(ReactApplicationContext reactContext, Application
            androidApplication, Instabug mInstabug); @Override String getName(); @ReactMethod void startWithToken(final String token, final ReadableArray invocationEventValues); @ReactMethod void appendTags(final ReadableArray tags); @ReactMethod void setAutoScreenRecordingEnabled(final boolean autoScreenRecordingEnabled); @ReactMethod void setAutoScreenRecordingMaxDuration(final int autoScreenRecordingMaxDuration); @ReactMethod void setLocale(final String instabugLocale); @ReactMethod void setExtendedBugReportMode(final String extendedBugReportMode); @ReactMethod void setViewHierarchyEnabled(final boolean enabled); @ReactMethod void setVideoRecordingFloatingButtonPosition(final String corner); @ReactMethod void setFileAttachment(final String fileUri, final String fileNameWithExtension); @ReactMethod void sendJSCrash(final String exceptionObject); @ReactMethod void sendHandledJSCrash(final String exceptionObject); @ReactMethod void setCrashReportingEnabled(final boolean isEnabled); @ReactMethod void setUserData(final String userData); @ReactMethod void setPrimaryColor(final int primaryColor); @ReactMethod void getTags(final Callback tagsCallback); @ReactMethod void identifyUserWithEmail(final String userEmail, final String userName); @ReactMethod void resetTags(); @ReactMethod boolean isEnabled(); @ReactMethod void enable(); @ReactMethod void disable(); @ReactMethod void showFeatureRequests(); @ReactMethod String getAppToken(); @ReactMethod void getUnreadMessagesCount(final Callback messageCountCallback); @ReactMethod void setInvocationEvent(final String invocationEventValue); @ReactMethod void setInvocationEvents(ReadableArray invocationEventValues); @ReactMethod void setInvocationOptions(final ReadableArray invocationOptionValues); @ReactMethod void setChatNotificationEnabled(final boolean isChatNotificationEnable); @ReactMethod void setDebugEnabled(final boolean isDebugEnabled); @ReactMethod void reportJsException(final ReadableArray stack, final String message, final String errorIdentifier); @ReactMethod void log(final String level, final String message); @ReactMethod void logVerbose(final String message); @ReactMethod void logDebug(final String message); @ReactMethod void logInfo(final String message); @ReactMethod void logError(final String message); @ReactMethod void logWarn(final String message); @ReactMethod void clearLogs(); @ReactMethod void hasRespondedToSurveyWithToken(final String surveyToken, final Callback hasRespondedCallback); @ReactMethod void showSurveyWithToken(final String surveyToken); @ReactMethod void setUserAttribute(final String key, final String value); @ReactMethod void getUserAttribute(final String key, final Callback userAttributeCallback); @ReactMethod void removeUserAttribute(final String key); @ReactMethod void getAllUserAttributes(final Callback userAttributesCallback); @ReactMethod void clearAllUserAttributes(); @ReactMethod void setColorTheme(final String theme); @ReactMethod void setString(final String string, final String key); @ReactMethod void logOut(); @ReactMethod void logUserEventWithName(final String name); @ReactMethod void setPreInvocationHandler(final Callback preInvocationHandler); @ReactMethod void setPreSendingHandler(final Callback preSendingHandler); @ReactMethod void appendTagToReport(String tag); @ReactMethod void appendConsoleLogToReport(String consoleLog); @ReactMethod void setUserAttributeToReport(String key, String value); @ReactMethod void logDebugToReport(String log); @ReactMethod void logVerboseToReport(String log); @ReactMethod void logWarnToReport(String log); @ReactMethod void logErrorToReport(String log); @ReactMethod void logInfoToReport(String log); @ReactMethod void addFileAttachmentWithURLToReport(String urlString, String fileName); @ReactMethod void addFileAttachmentWithDataToReport(String data, String fileName); @ReactMethod void getReport(Promise promise); @ReactMethod void setPostInvocationHandler(final Callback postInvocationHandler); @ReactMethod void showSurveysIfAvailable(); @ReactMethod void setSurveysEnabled(final boolean surveysEnabled); @ReactMethod void setWillShowSurveyHandler(final Callback willShowSurveyHandler); @ReactMethod void setDidDismissSurveyHandler(final Callback didDismissSurveyHandler); @ReactMethod void clearFileAttachment(); @ReactMethod void setReproStepsMode(final String reproStepsMode); @ReactMethod void showWelcomeMessageWithMode(final String welcomeMessageMode); @ReactMethod void setWelcomeMessageMode(final String welcomeMessageMode); @ReactMethod void setShakingThresholdForAndroid(final int androidThreshold); @ReactMethod void setOnNewMessageHandler(final Callback onNewMessageHandler); @ReactMethod void setOnNewReplyReceivedCallback(final Callback onNewReplyReceivedCallback); @ReactMethod void setThresholdForReshowingSurveyAfterDismiss(final int sessionsCount, final int daysCount); @ReactMethod void getAvailableSurveys(final Callback availableSurveysCallback); @ReactMethod void show(); @ReactMethod void setBugReportingEnabled(final boolean isEnabled); @ReactMethod void setChatsEnabled(final boolean isEnabled); @ReactMethod void showChats(); @ReactMethod void setRepliesEnabled(final boolean isEnabled); @ReactMethod void hasChats(final Callback callback); @ReactMethod void showReplies(); @ReactMethod void callPrivateApi(String apiName, String param); static JSONArray toJson(List<Survey> list); @ReactMethod void setAutoShowingSurveysEnabled(final boolean autoShowingSurveysEnabled); @ReactMethod void setEnableInAppNotificationSound(final boolean shouldPlaySound); @ReactMethod void setSessionProfilerEnabled(final boolean sessionProfilerEnabled); @ReactMethod void setShouldShowSurveysWelcomeScreen(final boolean shouldShow); @SuppressLint("WrongConstant") @ReactMethod void setEmailFieldRequiredForFeatureRequests(final boolean isEmailRequired, final ReadableArray actionTypes); @ReactMethod void networkLog(String jsonObject); @ReactMethod void hideView(final ReadableArray ids); @ReactMethod void reportScreenChange(final String screenName); @Override Map<String, Object> getConstants();  }
@Test public void given$show_whenQuery_thenShouldCallNativeApi() { PowerMockito.mockStatic(Instabug.class); rnModule.show(); PowerMockito.verifyStatic(VerificationModeFactory.times(1)); Instabug.show(); }