### Question:
BaseException extends Exception { public String getErrorCode() { return errorCode; } BaseException(String message, Throwable cause, String errorCode); String getErrorCode(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void constructorMessageCauseErrorCode() throws Exception { BaseException exception = new BaseException(MESSAGE, CAUSE, CODE); assertEquals("Unexpected message value", MESSAGE, exception.getMessage()); assertEquals("Unexpected cause value", CAUSE, exception.getCause()); assertEquals("Unexpected error code value", CODE, exception.getErrorCode()); }