RNInstabugRepliesModule extends ReactContextBaseJavaModule { @ReactMethod public void show() { MainThreadHandler.runOnMainThread(new Runnable() { @Override public void run() { Replies.show(); } }); } RNInstabugRepliesModule(ReactApplicationContext reactApplicationContext); @Nonnull @Override String getName(); @ReactMethod void setEnabled(final boolean isEnabled); @ReactMethod void hasChats(final Callback callback); @ReactMethod void show(); @ReactMethod void setInAppNotificationSound(final boolean shouldPlaySound); @ReactMethod void getUnreadRepliesCount(final Callback messageCountCallback); @ReactMethod void setInAppNotificationEnabled(final boolean isChatNotificationEnable); @ReactMethod void setOnNewReplyReceivedHandler(final Callback onNewReplyReceivedCallback);  }
@Test public void given$show_whenQuery_thenShouldCallNativeApi() { PowerMockito.mockStatic(Replies.class); rnModule.show(); PowerMockito.verifyStatic(VerificationModeFactory.times(1)); Replies.show(); }