// Path: src/main/java/com/github/quiram/buildhotspots/DateToFrequencyTransformer.java
// public class DateToFrequencyTransformer {
//     private LocalDateTime oldest;
//     private LocalDateTime mostRecent;
// 
// 
//     public LocalDateTime getOldestDate() {
//         return oldest;
//     }
// 
//     public void add(LocalDateTime dateTime) {
//         if (this.oldest == null || dateTime.isBefore(this.oldest)) {
//             this.oldest = dateTime;
//         }
// 
//         if (this.mostRecent == null || dateTime.isAfter(this.mostRecent)) {
//             mostRecent = dateTime;
//         }
//     }
// 
//     public LocalDateTime getMostRecentDate() {
//         return mostRecent;
//     }
// 
//     public long getFrequencyFor(LocalDateTime dateTime) {
//         if (oldest == null) {
//             throw new IllegalStateException("Transformer is empty.");
//         }
// 
//         if (oldest == mostRecent) {
//             throw new IllegalStateException("Transformer only has one element.");
//         }
// 
//         if (dateTime.isBefore(oldest) || dateTime.isAfter(mostRecent)) {
//             throw new IllegalArgumentException("Date to calculate frequency from must be within range of dates previously inserted in the transformer.");
//         }
// 
//         long totalRange = oldest.until(mostRecent, SECONDS);
//         long datePosition = oldest.until(dateTime, SECONDS);
// 
//         return datePosition * 100 / totalRange;
//     }
// }


import com.github.quiram.buildhotspots.DateToFrequencyTransformer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
package com.github.quiram.buildhotspots.datetofrequencytransformertest;


abstract public class DateToFrequencyTransformerTest {
    @Rule
    public ExpectedException onBadState = ExpectedException.none();
// Path: src/main/java/com/github/quiram/buildhotspots/DateToFrequencyTransformer.java
// public class DateToFrequencyTransformer {
//     private LocalDateTime oldest;
//     private LocalDateTime mostRecent;
// 
// 
//     public LocalDateTime getOldestDate() {
//         return oldest;
//     }
// 
//     public void add(LocalDateTime dateTime) {
//         if (this.oldest == null || dateTime.isBefore(this.oldest)) {
//             this.oldest = dateTime;
//         }
// 
//         if (this.mostRecent == null || dateTime.isAfter(this.mostRecent)) {
//             mostRecent = dateTime;
//         }
//     }
// 
//     public LocalDateTime getMostRecentDate() {
//         return mostRecent;
//     }
// 
//     public long getFrequencyFor(LocalDateTime dateTime) {
//         if (oldest == null) {
//             throw new IllegalStateException("Transformer is empty.");
//         }
// 
//         if (oldest == mostRecent) {
//             throw new IllegalStateException("Transformer only has one element.");
//         }
// 
//         if (dateTime.isBefore(oldest) || dateTime.isAfter(mostRecent)) {
//             throw new IllegalArgumentException("Date to calculate frequency from must be within range of dates previously inserted in the transformer.");
//         }
// 
//         long totalRange = oldest.until(mostRecent, SECONDS);
//         long datePosition = oldest.until(dateTime, SECONDS);
// 
//         return datePosition * 100 / totalRange;
//     }
// }


// Path: src/test/java/com/github/quiram/buildhotspots/datetofrequencytransformertest/DateToFrequencyTransformerTest.java
import com.github.quiram.buildhotspots.DateToFrequencyTransformer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.ExpectedException;

package com.github.quiram.buildhotspots.datetofrequencytransformertest;


abstract public class DateToFrequencyTransformerTest {
    @Rule
    public ExpectedException onBadState = ExpectedException.none();
    protected DateToFrequencyTransformer transformer;