public class PrioritizableComparator extends TestCase {
public void testCompare() {
PriorityBlockingQueue<Runnable> queue = new PriorityBlockingQueue<Runnable>(
50, new SocketRunnableComparator());
queue.add(new TestRunnable("runnable 1"));
queue.add(new TestPrioritizable(-1, "runnable 2"));
queue.add(new TestPrioritizable(-1, "runnable 3"));
queue.add(new TestPrioritizable(5, "runnable 4"));