### Question:
LensUtil { public static String getCauseMessage(@NonNull Throwable e) { String expMsg = null; if (e.getCause() != null) { expMsg = getCauseMessage(e.getCause()); } if (StringUtils.isBlank(expMsg)) { expMsg = e.getLocalizedMessage(); } return expMsg; } private  LensUtil(); static String getCauseMessage(@NonNull Throwable e); static Throwable getCause(@NonNull Throwable e); static boolean isSocketException(@NonNull Throwable e); static Set<T> getImplementationsMutable(final String factoriesKey, final Configuration conf); static ImmutableSet<T> getImplementations(final String factoriesKey, final Configuration conf); static T getImplementation(final String factoryName, final Configuration conf); static HashMap<K, V> getHashMap(Object... args); static void refreshLensTGT(HiveConf conf);  }### Answer:
@Test public void testExceptionCauseMessage() { Throwable th = null; try { try { throw new IOException("base cause"); } catch (IOException e) { throw new RuntimeException("run time exception", e); } } catch (Exception e) { th = e; } Assert.assertEquals(LensUtil.getCauseMessage(th), "base cause"); try { try { throw new IOException(); } catch (IOException e) { throw new RuntimeException("run time exception", e); } } catch (Exception e) { th = e; } Assert.assertEquals(LensUtil.getCauseMessage(th), "run time exception"); }