assertEquals("Expected clock 2 to be greater than clock 1.", VectorClockComparison.GREATER, VectorClock.compare(vc2, vc1));
}
@Test
public void testCompareSmallerClocksWithDifferentUnitCount() {
VectorClock vc1 = new VectorClock();
vc1.setClock("UnitA", 4L);
vc1.setClock("UnitB", 5L);
VectorClock vc2 = new VectorClock();
vc2.setClock("UnitA", 4L); // same
vc2.setClock("UnitB", 5L); // same
vc2.setClock("UnitC", 100000L); // not in vc1
assertEquals("Expected clock 1 to be smaller than clock 2.", VectorClockComparison.SMALLER, VectorClock.compare(vc1, vc2));
assertEquals("Expected clock 2 to be greater than clock 1.", VectorClockComparison.GREATER, VectorClock.compare(vc2, vc1));
}