@Test
public void testEscapingFormatter() throws Exception {

    try {
        Class<?> k = ErrorFormatter.class;
        Formatter f;
        f = LogManagerProperties.newFormatter(k.getName());
        assertEquals(k, f.getClass());
        setPending(new ThreadDeath());
        try {
            f = LogManagerProperties.newFormatter(k.getName());
            fail(String.valueOf(f));
        } catch (ThreadDeath expect) {
        }
        setPending(new OutOfMemoryError());
        try {
            f = LogManagerProperties.newFormatter(k.getName());
            fail(String.valueOf(f));
        } catch (OutOfMemoryError expect) {
        }
    } finally {
        setPending(null);
    }
}