@Test
public void testErrorFormat()
{

    // message-only version
    logger.error("hello, %s", "you");
    assertLog(Level.SEVERE, "hello, you");
    // throwable with message
    @SuppressWarnings("ThrowableInstanceNeverThrown")
    Throwable exception = new Throwable();
    logger.error(exception, "got exception: %s", "foo");
    assertLog(Level.SEVERE, "got exception: foo", exception);
    // throwable alone
    @SuppressWarnings("ThrowableInstanceNeverThrown")
    Throwable exception2 = new Throwable("the message");
    logger.error(exception2);
    assertLog(Level.SEVERE, exception2.getMessage(), exception2);
}