@Test
public void prettifyExceptionWithNpe() {

  String pretty = AdminHelper.prettifyException(new NullPointerException());
  Assert.assertTrue(
      "Prettified exception message doesn't contain the required exception "
          + "message",
      pretty.startsWith("NullPointerException at org.apache.hadoop.hdfs.tools"
          + ".TestAdminHelper.prettifyExceptionWithNpe"));
}