@Test
public void givenInvocationEvent$setInvocationEvents_whenQuery_thenShouldCallNativeApiWithArgs() {

    // given
    PowerMockito.mockStatic(BugReporting.class);
    final Map<String, Object> args = new HashMap<>();
    ArgsRegistry.registerInstabugInvocationEventsArgs(args);
    final String[] keysArray = args.keySet().toArray(new String[0]);
    JavaOnlyArray actualArray = new JavaOnlyArray();
    for (String key : keysArray) {
        actualArray.pushString(key);
    }
    // when
    bugReportingModule.setInvocationEvents(actualArray);
    // then
    PowerMockito.verifyStatic(VerificationModeFactory.times(1));
    BugReporting.setInvocationEvents(args.values().toArray(new InstabugInvocationEvent[0]));
}