// Path: api/src/main/java/hirez/api/HiRezUtils.java
// public class HiRezUtils {
//     public static Date parse(String timestamp) {
//         timestamp = timestamp.replace("\\/", "/");
//         SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a");
//         sdf.setTimeZone(TimeZone.getTimeZone(ZoneOffset.UTC));
//         try {
//             return sdf.parse(timestamp);
//         } catch (ParseException ignore) {
//             return null;
//         }
//     }
// }


import hirez.api.HiRezUtils;
import lombok.Data;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
package hirez.api.object;



@Data
public class TestSession {
    private final String rawMessage;
    private final boolean successful;
    private final Date timestamp;

    public TestSession(String raw) {
        this.rawMessage = raw.replace("\"", "");

        Matcher matcher = Pattern.compile("^(.+): developer: ([0-9]{4}) time: (?<timestamp>.+) signature: (.+) session: (.+)$").matcher(raw.replace("\"", ""));
        if (matcher.find()) {
            successful = true;
// Path: api/src/main/java/hirez/api/HiRezUtils.java
// public class HiRezUtils {
//     public static Date parse(String timestamp) {
//         timestamp = timestamp.replace("\\/", "/");
//         SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a");
//         sdf.setTimeZone(TimeZone.getTimeZone(ZoneOffset.UTC));
//         try {
//             return sdf.parse(timestamp);
//         } catch (ParseException ignore) {
//             return null;
//         }
//     }
// }


// Path: api/src/main/java/hirez/api/object/TestSession.java
import hirez.api.HiRezUtils;
import lombok.Data;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

package hirez.api.object;



@Data
public class TestSession {
    private final String rawMessage;
    private final boolean successful;
    private final Date timestamp;

    public TestSession(String raw) {
        this.rawMessage = raw.replace("\"", "");

        Matcher matcher = Pattern.compile("^(.+): developer: ([0-9]{4}) time: (?<timestamp>.+) signature: (.+) session: (.+)$").matcher(raw.replace("\"", ""));
        if (matcher.find()) {
            successful = true;
            timestamp = HiRezUtils.parse(matcher.group("timestamp"));