### Question:
ToolException extends RuntimeException { public final int getExitCode() { return exitCode; } ToolException(String message, int exitCode);  ToolException(String message, Throwable cause, int exitCode);  ToolException(Throwable cause, int exitCode); final int getExitCode(); static final int UNKNOWN_ERROR; static final int CONFIGURATION_FILE_NOT_FOUND_ERROR; static final int CONFIGURATION_FILE_IO_ERROR; static final int COMMAND_LINE_ARGUMENTS_PARSE_ERROR; static final int TOOL_CONFIGURATION_ERROR; static final int TOOL_USAGE_ERROR; static final int TOOL_ERROR; static final int TOOL_IO_ERROR; static final int TOOL_DB_ERROR; static final int TOOL_INTERNAL_ERROR; static final int NO_MATCHUPS_FOUND_ERROR; static final int TOO_MANY_MATCHUPS_FOUND_ERROR; }### Answer:
@Test public void testCreateWithCauseAndExitCode() { final String message = "we test this"; final Throwable throwable = new Throwable(message); final ToolException toolException = new ToolException(throwable, ToolException.TOOL_ERROR); assertEquals(ToolException.TOOL_ERROR, toolException.getExitCode()); final Throwable cause = toolException.getCause(); assertNotNull(cause); assertEquals(message, cause.getMessage()); }