public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) {
        return api.send(request);
    }
@Test
    public void sendMediaGroup() {
        String url = "https://google.com/";
        User user = new User(memberBot);
        String language = "ru";
        MessagesResponse response = bot.execute(new SendMediaGroup(chatId,
                new InputMediaPhoto(photoFileId).thumbnail(thumbFile),
                new InputMediaPhoto(imageFile).caption("some caption bold")
                        .captionEntities(
                                new MessageEntity(MessageEntity.Type.bold, 0, 4),
                                new MessageEntity(MessageEntity.Type.text_link, 5, 1).url(url),
                                new MessageEntity(MessageEntity.Type.text_mention, 6, 1).user(user),
                                new MessageEntity(MessageEntity.Type.pre, 7, 1).language(language)
                        ),
                new InputMediaPhoto(imageBytes).thumbnail(thumbBytes).hasSpoiler(true),
                new InputMediaVideo(videoFileId).hasSpoiler(true),
                new InputMediaVideo(videoFile),
                new InputMediaVideo(videoBytes).caption("my video <b>bold</b>").parseMode(ParseMode.HTML)
                        .duration(10).width(11).height(12).supportsStreaming(true)
        ).messageThreadId(0).disableNotification(false).allowSendingWithoutReply(false).replyToMessageId(1));
        assertTrue(response.isOk());
        assertEquals(6, response.messages().length);

        String mediaGroupId = response.messages()[0].mediaGroupId();
        assertNotNull(mediaGroupId);

        int messagesWithCaption = 0;
        for (Message message : response.messages()) {
            assertEquals(mediaGroupId, message.mediaGroupId());
            if (message.caption() != null) {
                assertEquals(MessageEntity.Type.bold, message.captionEntities()[0].type());
                messagesWithCaption++;
            }
        }
        assertEquals(2, messagesWithCaption);

        MessageEntity[] entities = response.messages()[1].captionEntities();
        assertEquals(MessageEntity.Type.bold, entities[0].type());
        assertEquals(MessageEntity.Type.text_link, entities[1].type());
        assertEquals(MessageEntity.Type.text_mention, entities[2].type());
        assertEquals(MessageEntity.Type.pre, entities[3].type());
        assertEquals(url, entities[1].url());
        assertEquals(user.id(), entities[2].user().id());
        assertEquals(language, entities[3].language());
    }