BatchException extends RuntimeException { @Deprecated public static BatchException createException(String messageId) { return new BatchException(messageId, MessageUtil.getMessage(messageId)); } BatchException();  BatchException(String message);  BatchException(String message, Throwable cause);  BatchException(Throwable cause); @Deprecated  BatchException(String messageId, String message); @Deprecated  BatchException(String messageId, String message, Throwable cause); @Deprecated  BatchException(String messageId, String message, Object... params); @Deprecated  BatchException(String messageId, String message, Throwable cause,
            Object... params); @Deprecated static BatchException createException(String messageId); @Deprecated static BatchException createException(String messageId,
            Object... params); @Deprecated static BatchException createException(String messageId,
            Throwable cause); @Deprecated static BatchException createException(String messageId,
            Throwable cause, Object... params); @Deprecated String getLogMessage(); @Deprecated String getMessageId();  }
@Test public void testCreateException01() throws Exception { BatchException result = BatchException .createException("errors.required"); assertNotNull(result); assertEquals("{0}は入力必須項目です.", result.getMessage()); }
@Test public void testCreateException02() throws Exception { BatchException result = BatchException.createException(null); assertNotNull(result); assertEquals("Message not found. CODE:[null]", result.getMessage()); }
@Test public void testCreateException03() throws Exception { BatchException result = BatchException.createException(""); assertNotNull(result); assertEquals("Message not found. CODE:[]", result.getMessage()); }
@Test public void testCreateException04() throws Exception { BatchException result = BatchException.createException( "errors.required", "test1"); assertNotNull(result); assertEquals("test1は入力必須項目です.", result.getMessage()); }
@Test public void testCreateException05() throws Exception { BatchException result = BatchException.createException("errors.range", "test1", "10", "20"); assertNotNull(result); assertEquals("test1には10から20までの範囲で入力してください.", result.getMessage()); }
@Test public void testCreateException06() throws Exception { BatchException result = BatchException.createException( "errors.required", new RuntimeException()); assertNotNull(result); assertEquals("{0}は入力必須項目です.", result.getMessage()); assertEquals("java.lang.RuntimeException", result.getCause().toString()); }
@Test public void testCreateException07() throws Exception { BatchException result = BatchException.createException( "errors.required", new RuntimeException(), "test1"); assertNotNull(result); assertEquals("test1は入力必須項目です.", result.getMessage()); assertEquals("java.lang.RuntimeException", result.getCause().toString()); }
@Test public void testCreateException08() throws Exception { BatchException result = BatchException.createException("errors.range", new RuntimeException(), "test1", "10", "20"); assertNotNull(result); assertEquals("test1には10から20までの範囲で入力してください.", result.getMessage()); assertEquals("java.lang.RuntimeException", result.getCause().toString()); }