public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) {
        return api.send(request);
    }
@Test
    public void sendVideo() {
        Message message = bot.execute(new SendVideo(chatId, videoFileId).hasSpoiler(true)).message();
        MessageTest.checkMessage(message);
        VideoTest.check(message.video(), false);

        message = bot.execute(new SendVideo(chatId, videoFile)
                .thumb(thumbFile)
                .caption("caption").captionEntities(new MessageEntity(MessageEntity.Type.italic, 0, 7))
        ).message();
        MessageTest.checkMessage(message);
        VideoTest.check(message.video());
        assertNotEquals("telegram should generate thumb", thumbSize, message.video().thumb().fileSize());
        assertEquals("tabs.mp4", message.video().fileName());
        MessageEntity captionEntity = message.captionEntities()[0];
        assertEquals(MessageEntity.Type.italic, captionEntity.type());
        assertEquals((Integer) 0, captionEntity.offset());
        assertEquals((Integer) 7, captionEntity.length());

        String caption = "caption <b>bold</b>";
        int duration = 6;
        message = bot.execute(
                        new SendVideo(chatId, videoBytes).thumb(thumbBytes)
                                .caption(caption).parseMode(ParseMode.HTML)
                                .duration(duration).height(1).width(2).supportsStreaming(true))
                .message();
        System.out.println(message);
        MessageTest.checkMessage(message);
        assertEquals(caption.replace("<b>", "").replace("</b>", ""), message.caption());

        Video video = message.video();
        VideoTest.check(message.video());
        assertEquals(duration, video.duration().intValue());
        assertEquals(120, video.height().intValue());
        assertEquals(400, video.width().intValue());
        assertEquals("video/mp4", video.mimeType());
        assertNotEquals("telegram should generate thumb", thumbSize, video.thumb().fileSize());

        captionEntity = message.captionEntities()[0];
        assertEquals(MessageEntity.Type.bold, captionEntity.type());
        assertEquals((Integer) 8, captionEntity.offset());
        assertEquals((Integer) 4, captionEntity.length());
    }