UnsupportedFormatException extends RuntimeException { public UnsupportedFormatException(Format<?> format) { super(format.toString()); } UnsupportedFormatException(Format<?> format);   }
@Test public void testUnsupportedFormatException() { try { buildUnsupportedFormatException(); } catch (UnsupportedFormatException e) { Assert.assertTrue(e.getMessage().contains("Mock for Format")); } }