Messages { public String getString(String key) { try { return res_bund.getString(key); } catch (MissingResourceException e) { return '!' + key + '!'; } } Messages(String countryTag); String getString(String key); void setBUNDLE_NAME(String bn);  }
@Test public void getEnglishMessages() { Messages m = new Messages("en"); assertNotNull(m); assertFalse(m.getString("Report.Distribution").startsWith("!")); assertTrue(m.getString("NONEXISTENT.KEY.SHOULD.BE.SOURROUNDED.BY.EXCLAMATION.MARKS").startsWith("!")); }