### Question:
GlobalMessageUtil { protected static boolean isMissingKey( final String string ) { return string == null || ( string.trim().startsWith( "!" ) && string.trim().endsWith( "!" ) && !string.trim().equals( "!" ) ); }  static String formatErrorMessage( String key, String msg ); static String getString( ResourceBundle bundle, String key ); static String getErrorString( ResourceBundle bundle, String key ); static String getString( ResourceBundle bundle, String key, String param1 ); static String getErrorString( ResourceBundle bundle, String key, String param1 ); static String getString( ResourceBundle bundle, String key, String param1, String param2 ); static String getErrorString( ResourceBundle bundle, String key, String param1, String param2 ); static String getString( ResourceBundle bundle, String key, String param1, String param2, String param3 ); static String getErrorString( ResourceBundle bundle, String key, String param1, String param2,
                                       String param3 ); static String getString( ResourceBundle bundle, String key, String param1, String param2, String param3,
                                  String param4 ); static String getString( ResourceBundle bundle, String key, String param1, String param2, String param3,
                                  String param4, String param5 ); static String getString( ResourceBundle bundle, String key, String param1, String param2, String param3,
                                  String param4, String param5, String param6 ); static String getErrorString( ResourceBundle bundle, String key, String param1, String param2,
                                       String param3, String param4 ); static void setLocale( Locale newLocale ); static Locale getLocale(); static LinkedHashSet<Locale> getActiveLocales(); static String calculateString( final String[] pkgNames, final String key, final Object[] parameters,
                                        final Class<?> resourceClass, final String bundleName ); static String calculateString( final String[] pkgNames, final String key, Object[] parameters,
                                        final Class<?> resourceClass, final String bundleName,
                                        final boolean fallbackOnRoot ); static String calculateString( final String[] pkgNames, final String key, final Object[] parameters,
                                        final Class<?> resourceClass, final String bundleName,
                                        final boolean logNotFoundError, final boolean fallbackOnRoot ); static ResourceBundle getBundle( final String packagePath, final Class<?> resourceClass ); static ResourceBundle getBundle( Locale locale, String packagePath, Class<?> resourceClass ); static ResourceBundle getBundle( final Locale locale, final String packagePath, final Class<?> resourceClass,
                                          final boolean fallbackOnRoot ); static final Locale FAILOVER_LOCALE; }### Answer:
@Test public void isMissingKey() { Assert.assertTrue( GlobalMessageUtil.isMissingKey( null ) ); Assert.assertFalse( GlobalMessageUtil.isMissingKey( "" ) ); Assert.assertFalse( GlobalMessageUtil.isMissingKey( " " ) ); Assert.assertTrue( GlobalMessageUtil.isMissingKey( "!foo!" ) ); Assert.assertTrue( GlobalMessageUtil.isMissingKey( "!foo! " ) ); Assert.assertTrue( GlobalMessageUtil.isMissingKey( " !foo!" ) ); Assert.assertFalse( GlobalMessageUtil.isMissingKey( "!foo" ) ); Assert.assertFalse( GlobalMessageUtil.isMissingKey( "foo!" ) ); Assert.assertFalse( GlobalMessageUtil.isMissingKey( "foo" ) ); Assert.assertFalse( GlobalMessageUtil.isMissingKey( "!" ) ); Assert.assertFalse( GlobalMessageUtil.isMissingKey( " !" ) ); }