ResourceNotification n = listener.await(5,TimeUnit.SECONDS);
assertEquals(Kind.ENTRY_MODIFY, n.getKind());
assertEquals(Paths.BASE, n.getPath());
assertEquals(1, n.events().size());
Event e = n.events().get(0);
assertEquals(Kind.ENTRY_MODIFY, e.getKind());
assertEquals("FileB", e.getPath());
listener.reset();
fileA.delete();
n = listener.await(5,TimeUnit.SECONDS);
assertEquals(Kind.ENTRY_MODIFY,n.getKind());
assertEquals(Paths.BASE,n.getPath());
e = n.events().get(0);
assertEquals(Kind.ENTRY_DELETE, e.getKind());
assertEquals("FileA", e.getPath());
listener.reset();
fileA.createNewFile();
n = listener.await(5,TimeUnit.SECONDS);
assertEquals(Kind.ENTRY_MODIFY,n.getKind());
assertEquals(Paths.BASE,n.getPath());
e = n.events().get(0);
assertEquals(Kind.ENTRY_CREATE, e.getKind());
assertEquals("FileA", e.getPath());
store.get(Paths.BASE).removeListener(listener);
}