@Test
public void should_merge_delete_with_create_events() {

	TestFileWatchEventCoalescor watchEventCoalescor = new TestFileWatchEventCoalescor();
	watchEventCoalescor.post("tmp/foo", StandardWatchEventKinds.ENTRY_DELETE);
	FileWatchEvent noise = watchEventCoalescor.post("tmp/bar", StandardWatchEventKinds.ENTRY_CREATE);// just to add some noise
	watchEventCoalescor.post("tmp/foo", StandardWatchEventKinds.ENTRY_CREATE);
	assertThat(watchEventCoalescor.removeNoise(noise)).isTrue(); // remove noisy event
	assertThat(watchEventCoalescor.scheduledEvents).hasSize(1);
	FileWatchEvent event = watchEventCoalescor.scheduledEvents.get(0).getReference();
	assertThat(event.getPath()).isEqualTo(Paths.get("tmp/foo"));
	assertThat(event.getKind()).isEqualTo(StandardWatchEventKinds.ENTRY_MODIFY);
}