// Path: lib/src/main/java/hrv/lib/hrv/RRData.java
// public class RRData {
// 
// 	private final TimeUnit rrValueAxisUnit;
// 	private final /*@ spec_public */ TimeUnit rrTimeAxisUnit;
// 
// 	private final double[] rrValuesAxis;
// 	private final double[] rrTimeAxis;
// 
// 	public RRData(double[] timeAxis, TimeUnit timeAxisUnit, double[] valueAxis, TimeUnit valueAxisUnit) {
// 		this.rrValuesAxis = valueAxis;
// 		this.rrValueAxisUnit = valueAxisUnit;
// 
// 		this.rrTimeAxis = timeAxis;
// 		this.rrTimeAxisUnit = timeAxisUnit;
// 	}
// 
// 	/**
// 	 * Creates a new RRData object from an RR-Interval
// 	 * 
// 	 * @param rrInterval
// 	 *            RR-Interval
// 	 * @param unit
// 	 *            of the given RR-Data.
// 	 * @return new RRData object with given RR-Interval data.
// 	 */
// 	public static RRData createFromRRInterval(double[] rrInterval, TimeUnit unit) {
// 		var rrTimeAxis = new double[rrInterval.length];
// 		for (var i = 1; i < rrInterval.length; i++) {
// 			rrTimeAxis[i] = rrTimeAxis[i - 1] + rrInterval[i - 1];
// 		}
// 
// 		return new RRData(rrTimeAxis, unit, rrInterval, unit);
// 	}
// 
// 	public double[] getValueAxis() {
// 		return rrValuesAxis;
// 	}
// 
// 	public double[] getTimeAxis() {
// 		return rrTimeAxis;
// 	}
// 	
// 	public TimeUnit getValueAxisUnit() {
// 		return rrValueAxisUnit;
// 	}
// 
// 	public TimeUnit getTimeAxisUnit() {
// 		return rrTimeAxisUnit;
// 	}
// }
// 
// Path: lib/src/main/java/hrv/lib/hrv/files/HRVIBIFileReader.java
// public class HRVIBIFileReader {
// 
// 	/**
// 	 * Reads the .ibi file that is specified in {@code filePath} and
// 	 * returns the data in form of a {@code List<Double>}
// 	 * @param filePath File to read
// 	 * @return Read data.
// 	 * @throws IOException throws IOException
// 	 */
// 	public RRData readIBIFile(String filePath, TimeUnit unit) throws IOException {
// 		List<Double> rr = new ArrayList<>();
// 		
// 		try(var reader = new BufferedReader(new FileReader(filePath))) {
// 			for(String line; (line = reader.readLine()) != null; ) {
// 				rr.add(Double.parseDouble(line));
// 			}
// 		}
// 		
// 		return RRData.createFromRRInterval(ArrayUtils.toPrimitive(rr, 0.0), unit);
// 	}
// }
// 
// Path: lib/src/main/java/hrv/lib/units/TimeUnit.java
// public enum TimeUnit {
// 	DAY("d"),
// 	HOUR("h"),
// 	MINUTE("m"),
// 	SECOND("s"),
// 	MILLISECOND("ms");
// 	
// 	private final String asText;
// 	
// 	TimeUnit(String asText) {
// 		this.asText = asText;
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return asText;
// 	}
// }


import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import hrv.lib.hrv.RRData;
import hrv.lib.hrv.files.HRVIBIFileReader;
import hrv.lib.units.TimeUnit;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
package hrv.lib.hrv.calc.manipulator;




class HRVCleanRRDataByLimitTest {

	private RRData dataWithDefects;
	private RRData cleanedData;
	
	@BeforeEach
	void loadData() throws IOException {
// Path: lib/src/main/java/hrv/lib/hrv/RRData.java
// public class RRData {
// 
// 	private final TimeUnit rrValueAxisUnit;
// 	private final /*@ spec_public */ TimeUnit rrTimeAxisUnit;
// 
// 	private final double[] rrValuesAxis;
// 	private final double[] rrTimeAxis;
// 
// 	public RRData(double[] timeAxis, TimeUnit timeAxisUnit, double[] valueAxis, TimeUnit valueAxisUnit) {
// 		this.rrValuesAxis = valueAxis;
// 		this.rrValueAxisUnit = valueAxisUnit;
// 
// 		this.rrTimeAxis = timeAxis;
// 		this.rrTimeAxisUnit = timeAxisUnit;
// 	}
// 
// 	/**
// 	 * Creates a new RRData object from an RR-Interval
// 	 * 
// 	 * @param rrInterval
// 	 *            RR-Interval
// 	 * @param unit
// 	 *            of the given RR-Data.
// 	 * @return new RRData object with given RR-Interval data.
// 	 */
// 	public static RRData createFromRRInterval(double[] rrInterval, TimeUnit unit) {
// 		var rrTimeAxis = new double[rrInterval.length];
// 		for (var i = 1; i < rrInterval.length; i++) {
// 			rrTimeAxis[i] = rrTimeAxis[i - 1] + rrInterval[i - 1];
// 		}
// 
// 		return new RRData(rrTimeAxis, unit, rrInterval, unit);
// 	}
// 
// 	public double[] getValueAxis() {
// 		return rrValuesAxis;
// 	}
// 
// 	public double[] getTimeAxis() {
// 		return rrTimeAxis;
// 	}
// 	
// 	public TimeUnit getValueAxisUnit() {
// 		return rrValueAxisUnit;
// 	}
// 
// 	public TimeUnit getTimeAxisUnit() {
// 		return rrTimeAxisUnit;
// 	}
// }
// 
// Path: lib/src/main/java/hrv/lib/hrv/files/HRVIBIFileReader.java
// public class HRVIBIFileReader {
// 
// 	/**
// 	 * Reads the .ibi file that is specified in {@code filePath} and
// 	 * returns the data in form of a {@code List<Double>}
// 	 * @param filePath File to read
// 	 * @return Read data.
// 	 * @throws IOException throws IOException
// 	 */
// 	public RRData readIBIFile(String filePath, TimeUnit unit) throws IOException {
// 		List<Double> rr = new ArrayList<>();
// 		
// 		try(var reader = new BufferedReader(new FileReader(filePath))) {
// 			for(String line; (line = reader.readLine()) != null; ) {
// 				rr.add(Double.parseDouble(line));
// 			}
// 		}
// 		
// 		return RRData.createFromRRInterval(ArrayUtils.toPrimitive(rr, 0.0), unit);
// 	}
// }
// 
// Path: lib/src/main/java/hrv/lib/units/TimeUnit.java
// public enum TimeUnit {
// 	DAY("d"),
// 	HOUR("h"),
// 	MINUTE("m"),
// 	SECOND("s"),
// 	MILLISECOND("ms");
// 	
// 	private final String asText;
// 	
// 	TimeUnit(String asText) {
// 		this.asText = asText;
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return asText;
// 	}
// }


// Path: lib/src/test/java/hrv/lib/hrv/calc/manipulator/HRVCleanRRDataByLimitTest.java
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import hrv.lib.hrv.RRData;
import hrv.lib.hrv.files.HRVIBIFileReader;
import hrv.lib.units.TimeUnit;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;

package hrv.lib.hrv.calc.manipulator;




class HRVCleanRRDataByLimitTest {

	private RRData dataWithDefects;
	private RRData cleanedData;
	
	@BeforeEach
	void loadData() throws IOException {
		HRVIBIFileReader reader = new HRVIBIFileReader();