@Test
public void given$setOnSDKDismissedHandler_whenQuery_thenShouldSetNativeCallback() {

    try {
        // given
        PowerMockito.mockStatic(BugReporting.class);
        PowerMockito.mockStatic(Arguments.class);
        PowerMockito.mockStatic(InstabugUtil.class);
        // when
        PowerMockito.when(Arguments.createMap()).thenReturn(new JavaOnlyMap());
        PowerMockito.doAnswer(new Answer<Object>() {
            @Override
            public Object answer(InvocationOnMock invocation) {
                ((OnSdkDismissCallback) invocation.getArguments()[0])
                        .call(OnSdkDismissCallback.DismissType.CANCEL, OnSdkDismissCallback.ReportType.BUG);
                return null;
            }
        }).when(BugReporting.class, "setOnDismissCallback", Matchers.anyObject());
        bugReportingModule.setOnSDKDismissedHandler(null);
        // then
        WritableMap params = new JavaOnlyMap();
        params.putString("dismissType", OnSdkDismissCallback.DismissType.CANCEL.toString());
        params.putString("reportType", OnSdkDismissCallback.ReportType.BUG.toString());
        PowerMockito.verifyStatic(VerificationModeFactory.times(1));
        InstabugUtil.sendEvent(any(ReactApplicationContext.class), eq(Constants.IBG_POST_INVOCATION_HANDLER), eq(params));
    } catch (Exception e) {
        e.printStackTrace();
    }
}