### Question:
Messages { public static String getString( String key ) { try { return RESOURCE_BUNDLE.getString( key ); } catch ( MissingResourceException e ) { return '!' + key + '!'; } } private  Messages(); static ResourceBundle getBundle(); static String getString( String key ); static String getString( String key, String param1 ); static String getString( String key, String param1, String param2 ); static String getString( String key, String param1, String param2, String param3 ); static String getString( String key, String param1, String param2, String param3, String param4 );  }### Answer:
@Test public void testGetString() throws Exception { assertEquals( "Database Connection", Messages.getString( "DatabaseDialog.Shell.title" ) ); assertEquals( "!Not.A.Message!", Messages.getString( "Not.A.Message" ) ); assertEquals( "MyParam: JDBC options help", Messages.getString( "DatabaseDialog.JDBCOptions.Tab", "MyParam" ) ); assertEquals( "!Not.A.Message!", Messages.getString( "Not.A.Message", "Unused1" ) ); assertEquals( "!null!", Messages.getString( null, "Unused1" ) ); assertEquals( "MyParam: JDBC options help", Messages.getString( "DatabaseDialog.JDBCOptions.Tab", "MyParam", "Unused" ) ); assertEquals( "!Not.A.Message!", Messages.getString( "Not.A.Message", "Unused1", "Unused2" ) ); assertEquals( "!null!", Messages.getString( null, null, null ) ); assertEquals( "MyParam: JDBC options help", Messages.getString( "DatabaseDialog.JDBCOptions.Tab", "MyParam", "Unused2", "Unused3" ) ); assertEquals( "!Not.A.Message!", Messages.getString( "Not.A.Message", "Unused1", "Unused2", "Unused3" ) ); assertEquals( "!null!", Messages.getString( null, null, null, null ) ); assertEquals( "MyParam: JDBC options help", Messages.getString( "DatabaseDialog.JDBCOptions.Tab", "MyParam", "Unused2", "Unused3", "Unused4" ) ); assertEquals( "!Not.A.Message!", Messages.getString( "Not.A.Message", "Unused1", "Unused2", "Unused3", "Unused4" ) ); assertEquals( "!null!", Messages.getString( null, null, null, null, null ) ); }