public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) {
        return api.send(request);
    }
@Test
    public void setChatPermissions() {
        for (boolean bool : new boolean[]{false, true}) {
            ChatPermissions setPerms = new ChatPermissions();
            setPerms.canSendMessages(bool);
            setPerms.canSendAudios(bool);
            setPerms.canSendDocuments(bool);
            setPerms.canSendPhotos(bool);
            setPerms.canSendVideos(bool);
            setPerms.canSendVideoNotes(bool);
            setPerms.canSendVoiceNotes(bool);
            setPerms.canSendPolls(bool);
            setPerms.canSendOtherMessages(bool);
            setPerms.canAddWebPagePreviews(bool);
            setPerms.canChangeInfo(bool);
            setPerms.canInviteUsers(bool);
            setPerms.canPinMessages(bool);
            setPerms.canManageTopics(bool);
            BaseResponse response = bot.execute(new SetChatPermissions(groupId, setPerms)
                    .useIndependentChatPermissions(false));
            assertTrue(response.isOk());

            ChatFullInfo chat = bot.execute(new GetChat(groupId)).chat();
            ChatPermissions permissions = chat.permissions();
            if (bool) {
                assertTrue(permissions.canSendMessages());
                assertTrue(permissions.canSendAudios());
                assertTrue(permissions.canSendDocuments());
                assertTrue(permissions.canSendPhotos());
                assertTrue(permissions.canSendVideos());
                assertTrue(permissions.canSendVideoNotes());
                assertTrue(permissions.canSendVoiceNotes());
                assertTrue(permissions.canSendPolls());
                assertTrue(permissions.canSendOtherMessages());
                assertTrue(permissions.canAddWebPagePreviews());
                assertFalse(permissions.canChangeInfo());
                assertTrue(permissions.canInviteUsers());
                assertFalse(permissions.canPinMessages());
                assertFalse(permissions.canManageTopics());
            } else {
                assertFalse(permissions.canSendMessages());
                assertFalse(permissions.canSendAudios());
                assertFalse(permissions.canSendDocuments());
                assertFalse(permissions.canSendPhotos());
                assertFalse(permissions.canSendVideos());
                assertFalse(permissions.canSendVideoNotes());
                assertFalse(permissions.canSendVoiceNotes());
                assertFalse(permissions.canSendPolls());
                assertFalse(permissions.canSendOtherMessages());
                assertFalse(permissions.canAddWebPagePreviews());
                assertFalse(permissions.canChangeInfo());
                assertFalse(permissions.canInviteUsers());
                assertFalse(permissions.canPinMessages());
                assertFalse(permissions.canManageTopics());
            }
        }
    }