@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());
}