@Test
public void testArrayThrowable() {

    FormattingTuple ft;
    Throwable t = new Throwable();
    Object[] ia = { 1, 2, 3, t };
    ft = MessageFormatter.arrayFormat("Value {} is smaller than {} and {}.", ia);
    assertEquals("Value 1 is smaller than 2 and 3.", ft.getMessage());
    assertEquals(t, ft.getThrowable());
    ft = MessageFormatter.arrayFormat("{}{}{}", ia);
    assertEquals("123", ft.getMessage());
    assertEquals(t, ft.getThrowable());
    ft = MessageFormatter.arrayFormat("Value {} is smaller than {}.", ia);
    assertEquals("Value 1 is smaller than 2.", ft.getMessage());
    assertEquals(t, ft.getThrowable());
    ft = MessageFormatter.arrayFormat("Value {} is smaller than {}", ia);
    assertEquals("Value 1 is smaller than 2", ft.getMessage());
    assertEquals(t, ft.getThrowable());
    ft = MessageFormatter.arrayFormat("Val={}, {, Val={}", ia);
    assertEquals("Val=1, {, Val=2", ft.getMessage());
    assertEquals(t, ft.getThrowable());
    ft = MessageFormatter.arrayFormat("Val={}, \\{, Val={}", ia);
    assertEquals("Val=1, \\{, Val=2", ft.getMessage());
    assertEquals(t, ft.getThrowable());
    ft = MessageFormatter.arrayFormat("Val1={}, Val2={", ia);
    assertEquals("Val1=1, Val2={", ft.getMessage());
    assertEquals(t, ft.getThrowable());
    ft = MessageFormatter.arrayFormat("Value {} is smaller than {} and {}.", ia);
    assertEquals("Value 1 is smaller than 2 and 3.", ft.getMessage());
    assertEquals(t, ft.getThrowable());
    ft = MessageFormatter.arrayFormat("{}{}{}{}", ia);
    assertEquals("123java.lang.Throwable", ft.getMessage());
    assertNull(ft.getThrowable());
}