SilentSender { public <T extends Serializable, Method extends BotApiMethod<T>, Callback extends SentCallback<T>> void executeAsync(Method method, Callback callable) { try { sender.executeAsync(method, callable); } catch (TelegramApiException e) { log.error("Could not execute bot API method", e); } } SilentSender(MessageSender sender); Optional<Message> send(String message, long id); Optional<Message> sendMd(String message, long id); Optional<Message> forceReply(String message, long id); Optional<T> execute(Method method); void executeAsync(Method method, Callback callable);  }
@Test void callsAsyncVariantOfExecute() throws TelegramApiException { SendMessage methodObject = new SendMessage(); NoOpCallback callback = new NoOpCallback(); silent.executeAsync(methodObject, callback); verify(sender, only()).executeAsync(methodObject, callback); }