@@ -0,0 +1,1717 @@
+package com.pengrad.telegrambot;%0A%0Aimport com.pengrad.telegrambot.model.Chat;%0Aimport com.pengrad.telegrambot.model.Message;%0Aimport com.pengrad.telegrambot.model.Update;%0Aimport com.pengrad.telegrambot.model.User;%0Aimport com.pengrad.telegrambot.response.GetUpdatesResponse;%0A%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0Aimport java.util.List;%0Aimport java.util.Properties;%0A%0A/**%0A * stas%0A * 3/31/16.%0A */%0Apublic class TestLoopGetUpdates %7B%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        Properties properties = new Properties();%0A        properties.load(new FileInputStream(%22local.properties%22));%0A        TelegramBot bot = TelegramBotAdapter.build(properties.getProperty(%22TEST_TOKEN%22));%0A%0A        GetUpdatesResponse updatesResponse;%0A        int j = 0;%0A        while (true) %7B%0A            try %7B%0A                updatesResponse = bot.getUpdates(j, 100, 20);%0A                List%3CUpdate%3E updates = updatesResponse.updates();%0A                for (int z = 0; z %3C updates.size(); z++) %7B%0A                    j = updates.get(z).updateId() + 1;%0A                    Message message = updates.get(z).message();%0A                    //%0A                    Chat chat = message.chat();%0A                    User user = message.from();%0A                    //String mes=message.text();%0A%0A                    // Base64.getEncoder().encodeToString(s.getBytes(StandardCharsets.UTF_8));%0A                    if (message.text() != null) %7B%0A                        System.out.println(%22New message: %22 + message.text() + %22 id: %22 + message.messageId() + %22 from %22 + chat);%0A                    %7D%0A%0A                %7D%0A            %7D catch (Exception e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Test get updates in endless loop