### Question:
SmooksResourceConfigurationSortComparator implements Comparator { public int compare(Object configObj1, Object configObj2) { SmooksResourceConfiguration config1 = (SmooksResourceConfiguration)configObj1; SmooksResourceConfiguration config = (SmooksResourceConfiguration)configObj2; if(config1 == config) { return 0; } double config1Specificity = getSpecificity(config1); double config2Specificity = getSpecificity(config); if(config1Specificity > config2Specificity) { return -1; } else if(config1Specificity < config2Specificity) { return 1; } else { return 0; } } SmooksResourceConfigurationSortComparator(ProfileSet profileSet); int compare(Object configObj1, Object configObj2);  }### Answer:
@Test public void test_compare() { SmooksResourceConfigurationSortComparator sortComparator = new SmooksResourceConfigurationSortComparator(profileSet); SmooksResourceConfiguration config1; SmooksResourceConfiguration config2; config1 = new SmooksResourceConfiguration("selector", "http: assertEquals(0, sortComparator.compare(config1, config1)); config1 = new SmooksResourceConfiguration("selector", "http: config2 = new SmooksResourceConfiguration("selector", "http: assertEquals(0, sortComparator.compare(config1, config2)); config1 = new SmooksResourceConfiguration("selector", "http: config2 = new SmooksResourceConfiguration("selector", "http: assertEquals(-1, sortComparator.compare(config1, config2)); config1 = new SmooksResourceConfiguration("selector", "http: config2 = new SmooksResourceConfiguration("selector", "http: assertEquals(1, sortComparator.compare(config1, config2)); }