ExecutorServiceHelper { public static String getFormattedExceptionInfo(Exception ex, NhinTargetSystemType target, String serviceName) { String err = "EXCEPTION: " + ex.getClass().getCanonicalName() + "\r\nEXCEPTION Cause Message: " + ex.getMessage() + "\r\n"; Throwable cause = ex.getCause(); if (cause != null) { err += "EXCEPTION Cause: " + cause.getClass().getCanonicalName() + "\r\n"; err += "EXCEPTION Cause Message: " + cause.getMessage(); } return err; } private  ExecutorServiceHelper(); static ExecutorServiceHelper getInstance(); int getExecutorPoolSize(); int getLargeJobExecutorPoolSize(); double getLargeJobPercentage(); Map getTimeoutValues(); boolean checkExecutorTaskIsLarge(int targetListCount); static void outputCompleteException(Exception e); static String getFormattedExceptionInfo(Exception ex, NhinTargetSystemType target, String serviceName);  }
@Test public void formattedExceptionIncludesMessage() { Exception e = mock(Exception.class); when(e.getMessage()).thenReturn("message"); String result = ExecutorServiceHelper.getFormattedExceptionInfo(e, null, null); assertTrue(result.contains("message")); }