<commit_before>package es.xan.servantv3;

import static org.junit.Assert.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;

import org.junit.Test;

import es.xan.servantv3.Scheduler.TimeExpression;

public class SchedulerTest {

	@Test
	public void scheduleWithRepetitionASecondAgo_tomorrow_ok() {
		LocalDateTime now = LocalDateTime.now();
		long nowEpoch = now.atZone(ZoneId.systemDefault()).toEpochSecond() * 1000;
		
		LocalDateTime tomorrow = LocalTime.now().atDate(LocalDate.now().plusDays(1));
		long target = tomorrow.atZone(ZoneId.systemDefault()).toEpochSecond() * 1000;
		
		TimeExpression at = Scheduler.at(LocalTime.now().plusSeconds(-1));
		long resolveDelay = at.resolveDelay();
		
		assertTrue(Math.abs(nowEpoch + resolveDelay - target) < 2000); 
	}

}<commit_msg>solving problems with junit test<commit_after>package es.xan.servantv3;


import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;

import es.xan.servantv3.Scheduler.TimeExpression;

public class SchedulerTest {

	public void scheduleWithRepetitionASecondAgo_tomorrow_ok() {
		LocalDateTime now = LocalDateTime.now();
		long nowEpoch = now.atZone(ZoneId.systemDefault()).toEpochSecond() * 1000;
		
		LocalDateTime tomorrow = LocalTime.now().atDate(LocalDate.now().plusDays(1));
		long target = tomorrow.atZone(ZoneId.systemDefault()).toEpochSecond() * 1000;
		
		TimeExpression at = Scheduler.at(LocalTime.now().plusSeconds(-1));
		long resolveDelay = at.resolveDelay();
		
	}

}
{'fraction_non_alphanumeric': 0.12389380530973451, 'fraction_numerical': 0.017699115044247787, 'mean_word_length': 5.434959349593496, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5155487', 'n_tokens_mistral': 559, 'n_tokens_neox': 502, 'n_words': 90}