ExceptionMessageMap { public static String getMessage(String code) { String str = MESSAGE_MAP.get(code); if (null == str) { return "NO MESSAGE FOR ERROR CODE. { code=[" + code + "] }"; } return str; }  static String getMessage(String code);  }
@Test public void testGetMessage() { assertGetMessageValid(null, "NO MESSAGE FOR ERROR CODE. { code=[null] }"); assertGetMessageValid("", "NO MESSAGE FOR ERROR CODE. { code=[] }"); assertGetMessageValid("0", "NO MESSAGE FOR ERROR CODE. { code=[0] }"); assertGetMessageValid("000001", "000001: A String argument was not specified but is required."); }