@Test
public void testCompare() {

    ServiceReference low = new MockLowPriorityServiceReference();
    ServiceReference nullPriority = new MockServiceReference();
    ServiceReference high = new MockHighPriorityServiceReference();
    OSGIServiceComparator instance = new OSGIServiceComparator();
    assertThat(1).isEqualTo(instance.compare(low, high));
    assertThat(-1).isEqualTo(instance.compare(high, low));
    assertThat(0).isEqualTo(instance.compare(low, low));
    assertThat(1).isEqualTo(instance.compare(nullPriority, high));
    assertThat(-1).isEqualTo(instance.compare(high, nullPriority));
    assertThat(0).isEqualTo(instance.compare(nullPriority, low));
}