LdapUserDetailsServiceMessages { public static String getString( final String key ) { try { return LdapUserDetailsServiceMessages.RESOURCE_BUNDLE.getString( key ); } catch ( MissingResourceException e ) { return '!' + key + '!'; } } private  LdapUserDetailsServiceMessages(); static String getString( final String key );  }
@Test public void testGetString() throws Exception { String s = LdapUserDetailsServiceMessages.getString( "any" ); assertEquals( "!any!", s ); }