@Test
public void testEscapingComparator() throws Exception {

    try {
        Class<?> k = ErrorComparator.class;
        Comparator<? super LogRecord> c;
        c = LogManagerProperties.newComparator(k.getName());
        assertEquals(k, c.getClass());
        setPending(new ThreadDeath());
        try {
            c = LogManagerProperties.newComparator(k.getName());
            fail(String.valueOf(c));
        } catch (ThreadDeath expect) {
        }
        setPending(new OutOfMemoryError());
        try {
            c = LogManagerProperties.newComparator(k.getName());
            fail(String.valueOf(c));
        } catch (OutOfMemoryError expect) {
        }
    } finally {
        setPending(null);
    }
}