Messages { public static String getErrorString( String key ) { return MessageUtil.formatErrorMessage( key, getString( key ) ); }  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 ); static String getErrorString( String key ); static String getErrorString( String key, String param1 ); static String getErrorString( String key, String param1, String param2 ); static String getErrorString( String key, String param1, String param2, String param3 ); static void main( String[] args );  }
@Test public void testErrorMessages() { assertEquals( "Wrong message returned", "StopJettyServer.ERROR_0003 - Unknown Host: localhost", Messages.getErrorString( "StopJettyServer.ERROR_0003_UNKNOWN_HOST", "localhost" ) ); assertEquals( "Wrong message returned", "PacService.ERROR_0048 - Failed to rollback transaction.", Messages.getErrorString( "PacService.ERROR_0048_ROLLBACK_FAILED" ) ); }