### Question:
ObjectCombinationGenericOrdering extends Ordering<ObjectCombination> { @Override public int compare(ObjectCombination left, ObjectCombination right) { if ( wildcardCount(left) < wildcardCount(right)) { return -1; } else if ( wildcardCount(left) > wildcardCount(right)) { return 1; } else if ( !wildcard(left.getActor()) && wildcard(right.getActor())) { return -1; } else if ( wildcard(left.getActor()) && !wildcard(right.getActor())) { return 1; } else if ( !wildcard(left.getObject()) && wildcard(right.getObject())) { return -1; } else if ( wildcard(left.getObject()) && !wildcard(right.getObject())) { return 1; } else if ( !wildcard(left.getTarget()) && wildcard(right.getTarget())) { return -1; } else if ( wildcard(left.getTarget()) && !wildcard(right.getTarget())) { return 1; } else if ( !wildcard(left.getProvider()) && wildcard(right.getProvider())) { return -1; } else if ( wildcard(left.getProvider()) && !wildcard(right.getProvider())) { return 1; } else { return 0; } } ObjectCombinationGenericOrdering(); @Override int compare(ObjectCombination left, ObjectCombination right);  }### Answer:
@Test public void compareWildcardCountTest() { ObjectCombination combination1 = new ObjectCombination(); ObjectCombination combination2 = new ObjectCombination().withActor("actor"); assert (new ObjectCombinationGenericOrdering()).compare(combination1, combination2) > 0; ObjectCombination combination3 = new ObjectCombination(); ObjectCombination combination4 = new ObjectCombination().withProvider("provider"); assert (new ObjectCombinationGenericOrdering()).compare(combination3, combination4) > 0; }