public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) {
        return api.send(request);
    }
@Test
    public void inviteLinks() {
        int memberLimit = 2;
        int expireDate = (int) (System.currentTimeMillis() / 1000) + 500;
        String name = "TestName";

        ChatInviteLinkResponse response = bot.execute(new CreateChatInviteLink(groupId)
                .expireDate(expireDate)
                .memberLimit(memberLimit)
                .name(name));
        ChatInviteLink link = response.chatInviteLink();
        assertEquals(expireDate, link.expireDate().intValue());
        assertEquals(memberLimit, link.memberLimit().intValue());
        assertFalse(link.isRevoked());
        assertTrue(link.creator().isBot());
        assertEquals(name, link.name());

        int editMemberLimit = 3;
        int editExpireDate = (int) (System.currentTimeMillis() / 1000) + 1500;
        String editName = name + "edit";
        response = bot.execute(new EditChatInviteLink(groupId, link.inviteLink())
                .expireDate(editExpireDate)
                .memberLimit(editMemberLimit)
                .name(editName));
        link = response.chatInviteLink();
        assertEquals(editExpireDate, link.expireDate().intValue());
        assertEquals(editMemberLimit, link.memberLimit().intValue());
        assertEquals(editName, link.name());
        assertFalse(link.isRevoked());

        response = bot.execute(new RevokeChatInviteLink(groupId, link.inviteLink()));
        link = response.chatInviteLink();
        assertTrue(link.isRevoked());
        assertFalse(link.isPrimary());

        response = bot.execute(new CreateChatInviteLink(groupId).createsJoinRequest(true));
        link = response.chatInviteLink();
        assertTrue(link.createsJoinRequest());
        assertNull(link.pendingJoinRequestCount());

        response = bot.execute(new EditChatInviteLink(groupId, link.inviteLink()).createsJoinRequest(false));
        assertFalse(response.chatInviteLink().createsJoinRequest());
    }