}
@Test
public void testSync() {
TestSinkTime tst = new TestSinkTime();
SourceTime st = new SourceTime("test");
if (tst.isSynchEnable()) {
System.err.printf("sync is enable%n");
assertTrue(tst.isNewEvent(st.getSourceId(), st.newEvent()));
assertTrue(tst.isNewEvent(st.getSourceId(), st.newEvent()));
assertTrue(tst.isNewEvent(st.getSourceId(), st.newEvent()));
long timeId = st.newEvent();
assertTrue(tst.isNewEvent(st.getSourceId(), timeId));
assertFalse(tst.isNewEvent(st.getSourceId(), timeId));
} else {
System.err.printf("sync is disable%n");
assertTrue(tst.isNewEvent(st.getSourceId(), st.newEvent()));
assertTrue(tst.isNewEvent(st.getSourceId(), st.newEvent()));
assertTrue(tst.isNewEvent(st.getSourceId(), st.newEvent()));
long timeId = st.newEvent();
assertTrue(tst.isNewEvent(st.getSourceId(), timeId));
assertTrue(tst.isNewEvent(st.getSourceId(), timeId));
}
}