How to mock Twilio Execution

31 Views Asked by At

I have a code snippet where other than other things, I am executing Twilio flow using the Execution class as below:

Execution execution = Execution.creator(flowSID, new com.twilio.type.PhoneNumber(toNumber),
                                                        new com.twilio.type.PhoneNumber(fromNumber))
                                                .setParameters(new HashMap<String, Object>() {
                                                    {
                                                        put("aParam", infos);
                                                        put("extender", ext);
                                                        put("vt", vtVal);
                                                    }
                                                }).create();

How can I mock this and perform testing? I tried static mocking as well using mockito-inline

0

There are 0 best solutions below