// Path: src/test/java/com/rhcloud/analytics4github/TestApplicationContext.java
// @SpringBootApplication
// public class TestApplicationContext {
// 
//     public static void main(String[] args) {
//         SpringApplication.run(Application.class, args);
//     }
// 
// }
// 
// Path: src/main/java/com/rhcloud/analytics4github/config/GitHubApiEndpoints.java
// public enum GitHubApiEndpoints {
//     COMMITS, STARGAZERS
// }
// 
// Path: src/main/java/com/rhcloud/analytics4github/dto/RequestFromFrontendDto.java
// @ApiModel
// public class RequestFromFrontendDto {
//     @ApiParam(required = true, example = "mewo2", value = "a repository author. Example: mewo2")
//     private String author;
//     @ApiParam(required = true, example = "terrain", value = "a repository author. Example: terrain")
//     private String repository;
//     @ApiParam(required = true, example = "2016-08-10", value = "a data to start analyze from. Example: 2016-08-10")
//     @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
//     private LocalDate startPeriod;
//     @ApiParam(required = true, example = "2016-08-17", value = "a data until analyze. Example: 2016-08-17")
//     @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
//     private LocalDate endPeriod;
// 
//     public RequestFromFrontendDto() {
//     }
// 
//     public String getAuthor() {
//         return author;
//     }
// 
//     public void setAuthor(String author) {
//         this.author = author;
//     }
// 
//     public String getRepository() {
//         return repository;
//     }
// 
//     public void setRepository(String repository) {
//         this.repository = repository;
//     }
// 
//     public LocalDate getStartPeriod() {
//         return startPeriod;
//     }
// 
//     public void setStartPeriod(LocalDate startPeriod) {
//         this.startPeriod = startPeriod;
//     }
// 
//     public LocalDate getEndPeriod() {
//         return endPeriod;
//     }
// 
//     public void setEndPeriod(LocalDate endPeriod) {
//         this.endPeriod = endPeriod;
//     }
// }
// 
// Path: src/main/java/com/rhcloud/analytics4github/exception/GitHubRESTApiException.java
// public class GitHubRESTApiException extends Exception {
// 
//     public GitHubRESTApiException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }


import com.fasterxml.jackson.databind.JsonNode;
import com.rhcloud.analytics4github.TestApplicationContext;
import com.rhcloud.analytics4github.config.GitHubApiEndpoints;
import com.rhcloud.analytics4github.dto.RequestFromFrontendDto;
import com.rhcloud.analytics4github.exception.GitHubRESTApiException;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;
import java.net.URISyntaxException;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
package com.rhcloud.analytics4github.util;




/**
 * @author lyashenkogs.
 */
@RunWith(SpringRunner.class)
@ActiveProfiles("test")
@SpringBootTest(classes = TestApplicationContext.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class GitHubApiIteratorTest {
    private static Logger LOG = LoggerFactory.getLogger(GitHubApiIteratorTest.class);
// Path: src/test/java/com/rhcloud/analytics4github/TestApplicationContext.java
// @SpringBootApplication
// public class TestApplicationContext {
// 
//     public static void main(String[] args) {
//         SpringApplication.run(Application.class, args);
//     }
// 
// }
// 
// Path: src/main/java/com/rhcloud/analytics4github/config/GitHubApiEndpoints.java
// public enum GitHubApiEndpoints {
//     COMMITS, STARGAZERS
// }
// 
// Path: src/main/java/com/rhcloud/analytics4github/dto/RequestFromFrontendDto.java
// @ApiModel
// public class RequestFromFrontendDto {
//     @ApiParam(required = true, example = "mewo2", value = "a repository author. Example: mewo2")
//     private String author;
//     @ApiParam(required = true, example = "terrain", value = "a repository author. Example: terrain")
//     private String repository;
//     @ApiParam(required = true, example = "2016-08-10", value = "a data to start analyze from. Example: 2016-08-10")
//     @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
//     private LocalDate startPeriod;
//     @ApiParam(required = true, example = "2016-08-17", value = "a data until analyze. Example: 2016-08-17")
//     @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
//     private LocalDate endPeriod;
// 
//     public RequestFromFrontendDto() {
//     }
// 
//     public String getAuthor() {
//         return author;
//     }
// 
//     public void setAuthor(String author) {
//         this.author = author;
//     }
// 
//     public String getRepository() {
//         return repository;
//     }
// 
//     public void setRepository(String repository) {
//         this.repository = repository;
//     }
// 
//     public LocalDate getStartPeriod() {
//         return startPeriod;
//     }
// 
//     public void setStartPeriod(LocalDate startPeriod) {
//         this.startPeriod = startPeriod;
//     }
// 
//     public LocalDate getEndPeriod() {
//         return endPeriod;
//     }
// 
//     public void setEndPeriod(LocalDate endPeriod) {
//         this.endPeriod = endPeriod;
//     }
// }
// 
// Path: src/main/java/com/rhcloud/analytics4github/exception/GitHubRESTApiException.java
// public class GitHubRESTApiException extends Exception {
// 
//     public GitHubRESTApiException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }


// Path: src/test/java/com/rhcloud/analytics4github/util/GitHubApiIteratorTest.java
import com.fasterxml.jackson.databind.JsonNode;
import com.rhcloud.analytics4github.TestApplicationContext;
import com.rhcloud.analytics4github.config.GitHubApiEndpoints;
import com.rhcloud.analytics4github.dto.RequestFromFrontendDto;
import com.rhcloud.analytics4github.exception.GitHubRESTApiException;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;
import java.net.URISyntaxException;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

package com.rhcloud.analytics4github.util;




/**
 * @author lyashenkogs.
 */
@RunWith(SpringRunner.class)
@ActiveProfiles("test")
@SpringBootTest(classes = TestApplicationContext.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class GitHubApiIteratorTest {
    private static Logger LOG = LoggerFactory.getLogger(GitHubApiIteratorTest.class);
    private static String PROJECT_NAME = "DevLight-Mobile-Agency/InfiniteCycleViewPager";