Since you change the logic in isDeliveryStatusSuccess, message will need message.type to check the delivery status, message.type is missed in fakeMessage since it was for other testing. If you want to test the message delivery status in this suite, please set the message type for testing and reset type/deliveryStatus/deliveryInfo to null in tear-down.