// Path: src/main/java/de/wellnerbou/chronic/replay/LogLineData.java
// public class LogLineData {
// 	private long time;
// 	private String clientip;
// 	private String requestMethod;
// 	private String request;
// 	private long duration;
// 	private String statusCode;
// 	private String userAgent;
// 	private String referrer;
// 	private String host;
// 	private String scheme;
// 
// 	public long getTime() {
// 		return time;
// 	}
// 
// 	public void setTime(final long time) {
// 		this.time = time;
// 	}
// 
// 	public String getRequestMethod() {
// 		return requestMethod;
// 	}
// 
// 	public void setRequestMethod(final String requestMethod) {
// 		this.requestMethod = requestMethod;
// 	}
// 
// 	public String getRequest() {
// 		return request;
// 	}
// 
// 	public void setRequest(final String request) {
// 		this.request = request;
// 	}
// 
// 	public long getDuration() {
// 		return duration;
// 	}
// 
// 	public void setDuration(final long duration) {
// 		this.duration = duration;
// 	}
// 
// 	public String getStatusCode() {
// 		return statusCode;
// 	}
// 
// 	public void setStatusCode(final String statusCode) {
// 		this.statusCode = statusCode;
// 	}
// 
// 	public String getUserAgent() {
// 		return userAgent;
// 	}
// 
// 	public void setUserAgent(String userAgent) {
// 		this.userAgent = userAgent;
// 	}
// 
// 	public void setReferrer(final String referrer) {
// 		this.referrer = referrer;
// 	}
// 
// 	public void setHost(String host) {
// 		this.host = host;
// 	}
// 
// 	public String getHost() {
// 		return host;
// 	}
// 
// 	public String getClientip() {
// 		return clientip;
// 	}
// 
// 	public void setClientip(final String clientip) {
// 		this.clientip = clientip;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "LogLineData{" +
// 				"time=" + time +
// 				", clientip='" + clientip + '\'' +
// 				", requestMethod='" + requestMethod + '\'' +
// 				", request='" + request + '\'' +
// 				", duration=" + duration +
// 				", statusCode='" + statusCode + '\'' +
// 				", userAgent='" + userAgent + '\'' +
// 				", referrer='" + referrer + '\'' +
// 				", host='" + host + '\'' +
// 				", scheme='" + scheme + '\'' +
// 				'}';
// 	}
// 
// 	public String getScheme() {
// 		return scheme;
// 	}
// 
// 	public void setScheme(final String scheme) {
// 		this.scheme = scheme;
// 	}
// }


import de.wellnerbou.chronic.replay.LogLineData;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
                    "1.1.1.1", "/path", 1531440000000L,
                    "304", 0L
            }, {
                    "1.1.1.1 2.2.2.2 - - [13/Jul/2018:00:00:00 +0200] \"GET /?param1=1&param2=2 HTTP/1.1\" 200 87131 okhttp/3.10.0",
                    "%{IPORHOST:clientip} %{IPORHOST:clientip2} %{USER:ident} %{USER:auth} \\[%{HTTPDATE:timestamp}\\] \"(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})\" %{NUMBER:response} (?:%{NUMBER:bytes}|-) (?:%{DATA:useragent}|-)",
                    "1.1.1.1", "/?param1=1&param2=2", 1531440000000L,
                    "200", 0L
            }, {
                    "[13/Jul/2018:00:00:00 +0200] https://dlfkultur.deutschlandradio.de/kinderhoerspiel.960.de.nltext",
                    "\\[%{HTTPDATE:timestamp}\\] %{NOTSPACE:request}",
                    "null", "https://dlfkultur.deutschlandradio.de/kinderhoerspiel.960.de.nltext", 1531440000000L,
                    "null", 0L
            }
        });
    }

    public GrokLogFormatLogLineParserTest(String logline, String pattern, String expectedIp, String request, Long timestamp, String responseStatus, Long duration) {
        this.logline = logline;
        this.pattern = pattern;
        this.expectedIp = expectedIp;
        this.request = request;
        this.timestamp = timestamp;
        this.responseStatus = responseStatus;
        this.duration = duration;
    }

    @Test
    public void testParseLine() {
        GrokLogFormatLogLineParser logLineParser = new GrokLogFormatLogLineParser();
        logLineParser.init(pattern, new GrokResultMapper());
// Path: src/main/java/de/wellnerbou/chronic/replay/LogLineData.java
// public class LogLineData {
// 	private long time;
// 	private String clientip;
// 	private String requestMethod;
// 	private String request;
// 	private long duration;
// 	private String statusCode;
// 	private String userAgent;
// 	private String referrer;
// 	private String host;
// 	private String scheme;
// 
// 	public long getTime() {
// 		return time;
// 	}
// 
// 	public void setTime(final long time) {
// 		this.time = time;
// 	}
// 
// 	public String getRequestMethod() {
// 		return requestMethod;
// 	}
// 
// 	public void setRequestMethod(final String requestMethod) {
// 		this.requestMethod = requestMethod;
// 	}
// 
// 	public String getRequest() {
// 		return request;
// 	}
// 
// 	public void setRequest(final String request) {
// 		this.request = request;
// 	}
// 
// 	public long getDuration() {
// 		return duration;
// 	}
// 
// 	public void setDuration(final long duration) {
// 		this.duration = duration;
// 	}
// 
// 	public String getStatusCode() {
// 		return statusCode;
// 	}
// 
// 	public void setStatusCode(final String statusCode) {
// 		this.statusCode = statusCode;
// 	}
// 
// 	public String getUserAgent() {
// 		return userAgent;
// 	}
// 
// 	public void setUserAgent(String userAgent) {
// 		this.userAgent = userAgent;
// 	}
// 
// 	public void setReferrer(final String referrer) {
// 		this.referrer = referrer;
// 	}
// 
// 	public void setHost(String host) {
// 		this.host = host;
// 	}
// 
// 	public String getHost() {
// 		return host;
// 	}
// 
// 	public String getClientip() {
// 		return clientip;
// 	}
// 
// 	public void setClientip(final String clientip) {
// 		this.clientip = clientip;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "LogLineData{" +
// 				"time=" + time +
// 				", clientip='" + clientip + '\'' +
// 				", requestMethod='" + requestMethod + '\'' +
// 				", request='" + request + '\'' +
// 				", duration=" + duration +
// 				", statusCode='" + statusCode + '\'' +
// 				", userAgent='" + userAgent + '\'' +
// 				", referrer='" + referrer + '\'' +
// 				", host='" + host + '\'' +
// 				", scheme='" + scheme + '\'' +
// 				'}';
// 	}
// 
// 	public String getScheme() {
// 		return scheme;
// 	}
// 
// 	public void setScheme(final String scheme) {
// 		this.scheme = scheme;
// 	}
// }


// Path: src/test/java/de/wellnerbou/chronic/logparser/GrokLogFormatLogLineParserTest.java
import de.wellnerbou.chronic.replay.LogLineData;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;

                    "1.1.1.1", "/path", 1531440000000L,
                    "304", 0L
            }, {
                    "1.1.1.1 2.2.2.2 - - [13/Jul/2018:00:00:00 +0200] \"GET /?param1=1&param2=2 HTTP/1.1\" 200 87131 okhttp/3.10.0",
                    "%{IPORHOST:clientip} %{IPORHOST:clientip2} %{USER:ident} %{USER:auth} \\[%{HTTPDATE:timestamp}\\] \"(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})\" %{NUMBER:response} (?:%{NUMBER:bytes}|-) (?:%{DATA:useragent}|-)",
                    "1.1.1.1", "/?param1=1&param2=2", 1531440000000L,
                    "200", 0L
            }, {
                    "[13/Jul/2018:00:00:00 +0200] https://dlfkultur.deutschlandradio.de/kinderhoerspiel.960.de.nltext",
                    "\\[%{HTTPDATE:timestamp}\\] %{NOTSPACE:request}",
                    "null", "https://dlfkultur.deutschlandradio.de/kinderhoerspiel.960.de.nltext", 1531440000000L,
                    "null", 0L
            }
        });
    }

    public GrokLogFormatLogLineParserTest(String logline, String pattern, String expectedIp, String request, Long timestamp, String responseStatus, Long duration) {
        this.logline = logline;
        this.pattern = pattern;
        this.expectedIp = expectedIp;
        this.request = request;
        this.timestamp = timestamp;
        this.responseStatus = responseStatus;
        this.duration = duration;
    }

    @Test
    public void testParseLine() {
        GrokLogFormatLogLineParser logLineParser = new GrokLogFormatLogLineParser();
        logLineParser.init(pattern, new GrokResultMapper());
        LogLineData logLineData = logLineParser.parseLine(logline);