@Test
public void testCompare() {

	PropertyServiceReferenceComparator<Object>
		propertyServiceReferenceComparator =
			new PropertyServiceReferenceComparator<>("ranking");
	ServiceReference<Object> serviceReference1 = new TestServiceReference<>(
		"ranking", 1);
	ServiceReference<Object> serviceReference2 = new TestServiceReference<>(
		"ranking", 2);
	int compare = propertyServiceReferenceComparator.compare(
		serviceReference2, serviceReference1);
	Assert.assertTrue(compare < 0);
	Assert.assertEquals(
		propertyServiceReferenceComparator.compare(
			serviceReference1, serviceReference2),
		-propertyServiceReferenceComparator.compare(
			serviceReference2, serviceReference1));
	ServiceReference<Object> serviceReference3 = new TestServiceReference<>(
		"ranking", 1);
	Assert.assertEquals(
		0,
		propertyServiceReferenceComparator.compare(
			serviceReference1, serviceReference3));
}