### Question:
BusinessException extends RuntimeException { public int getErrorCode() { return errorCode; } BusinessException();  BusinessException(String message);  BusinessException(String message, Throwable cause);  BusinessException(Throwable cause);  BusinessException(int errorCode, String message);  BusinessException(int errorCode, String message, Throwable cause); int getErrorCode(); void setErrorCode(int errorCode);  }### Answer:
@Test public void testConstructor() throws Exception { BusinessException instance = new BusinessException(); Assert.assertEquals(null, instance.getMessage()); Throwable cause = new Throwable("test throwable"); String msg = "test error text"; instance = new BusinessException(msg, cause); Assert.assertEquals(msg, instance.getMessage()); instance = new BusinessException(cause); Assert.assertEquals(cause, instance.getCause()); int errorCode = 100; instance = new BusinessException(errorCode, msg, cause); Assert.assertEquals(errorCode, instance.getErrorCode()); Assert.assertEquals(msg, instance.getMessage()); Assert.assertEquals(cause, instance.getCause()); }