public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) {
        return api.send(request);
    }
@Test
    public void editMessageMedia() {
        int messageId = 13541;
        SendResponse response;

        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId,
                new InputMediaDocument(docFile)
                        .thumb(thumbFile)
                        .disableContentTypeDetection(true)
        ).replyMarkup(new InlineKeyboardMarkup()));
        assertEquals((Long) 13264L, response.message().document().fileSize());
        assertEquals(thumbSize, response.message().document().thumb().fileSize());

        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId,
                new InputMediaDocument(docBytes).thumb(thumbBytes)));
        assertEquals((Long) 13264L, response.message().document().fileSize());
        assertEquals(thumbSize, response.message().document().thumb().fileSize());

        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId, new InputMediaDocument(docFileId)));
        MessageTest.checkMessage(response.message());
        DocumentTest.check(response.message().document());


        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId, new InputMediaAnimation(gifFile)));
        assertEquals(Integer.valueOf(1), response.message().animation().duration());

        int expectedSize = 160; // idk why?
        Integer durationAnim = 17, width = 21, height = 22;
        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId,
                new InputMediaAnimation(gifBytes).duration(durationAnim).width(width).height(height).hasSpoiler(true)
        ));
        Animation animation = response.message().animation();
        assertEquals(1, animation.duration().intValue());
        assertEquals(expectedSize, animation.width().intValue());
        assertEquals(expectedSize, animation.height().intValue());

        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId, new InputMediaAnimation(gifFileId)));
        assertTrue(response.isOk());
        AnimationCheck.check(response.message().animation());
        assertEquals(Integer.valueOf(3), response.message().animation().duration());
        assertNotEquals(gifFileId, response.message().animation().fileId());
        assertNotNull(response.message().document());
        assertEquals(Long.valueOf(57527), response.message().document().fileSize());
        assertEquals("video/mp4", response.message().document().mimeType());

        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId, new InputMediaAudio(audioFileId)));
        assertEquals(Long.valueOf(10286), response.message().audio().fileSize());
        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId, new InputMediaAudio(audioFile)));
        assertEquals(Long.valueOf(10286), response.message().audio().fileSize());
        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId, new InputMediaAudio(audioBytes)));
        assertEquals(Long.valueOf(10286), response.message().audio().fileSize());
        Integer duration = 34;
        String performer = "some performer", title = "just a title", fileName = "beep.mp3";
        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId,
                new InputMediaAudio(audioFile).duration(duration).performer(performer).title(title)
        ));
        Audio audio = response.message().audio();
        assertEquals(Long.valueOf(10286), audio.fileSize());
        assertEquals(duration, audio.duration());
        assertEquals(performer, audio.performer());
        assertEquals(title, audio.title());
        assertEquals(fileName, audio.fileName());

        // send multipart InputMediaPhoto, InputMediaVideo to cover getFileName and getContentType
        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId, new InputMediaPhoto(photoFileId).thumb(thumbFile)));
        assertNotNull(response.message().photo());
        response = (SendResponse) bot.execute(new EditMessageMedia(chatId, messageId, new InputMediaVideo(videoFileId).thumb(thumbFile)));
        assertNotNull(response.message().video());
    }