@Test public void throwAsSecHubExecutionException_throws_adapter_exception_when_exception_is_runtime_exception() throws Exception { RuntimeException cause = new RuntimeException(); expected.expect(SecHubExecutionException.class); expected.expectMessage("message1"); expected.expectCause(equalTo(cause)); throwAsSecHubExecutionException("message1", cause); }
public static void throwAsSecHubExecutionException(String message, Exception e) throws SecHubExecutionException { if (e instanceof SecHubExecutionException) { throw (SecHubExecutionException) e; } else { throw new SecHubExecutionException(message, e); } }
SecHubExecutionException extends Exception { public static void throwAsSecHubExecutionException(String message, Exception e) throws SecHubExecutionException { if (e instanceof SecHubExecutionException) { throw (SecHubExecutionException) e; } else { throw new SecHubExecutionException(message, e); } } }
SecHubExecutionException extends Exception { public static void throwAsSecHubExecutionException(String message, Exception e) throws SecHubExecutionException { if (e instanceof SecHubExecutionException) { throw (SecHubExecutionException) e; } else { throw new SecHubExecutionException(message, e); } } SecHubExecutionException(String message, Throwable cause);  SecHubExecutionException(String message); }
SecHubExecutionException extends Exception { public static void throwAsSecHubExecutionException(String message, Exception e) throws SecHubExecutionException { if (e instanceof SecHubExecutionException) { throw (SecHubExecutionException) e; } else { throw new SecHubExecutionException(message, e); } } SecHubExecutionException(String message, Throwable cause);  SecHubExecutionException(String message); static void throwAsSecHubExecutionException(String message, Exception e); }
SecHubExecutionException extends Exception { public static void throwAsSecHubExecutionException(String message, Exception e) throws SecHubExecutionException { if (e instanceof SecHubExecutionException) { throw (SecHubExecutionException) e; } else { throw new SecHubExecutionException(message, e); } } SecHubExecutionException(String message, Throwable cause);  SecHubExecutionException(String message); static void throwAsSecHubExecutionException(String message, Exception e);  }