ExceptionMessages extends ApplicationConfig { public static String getMessagePattern(String key) throws Exception { return getProps().getProperty(key); }  static String getMessagePattern(String key); static void setConfigFileName(String name); static String getConfigFileName();  }
@Test public void testGetMessagePattern() throws Exception { String pattern = ExceptionMessages.getMessagePattern(key0); assertNotNull(pattern); assertEquals(val0, pattern); }
@Test public void testGetMessagePatternBad() throws Exception { String pattern = ExceptionMessages.getMessagePattern(key1); assertEquals(null, pattern); }