SofaTracerRuntimeException extends RuntimeException { public SofaTracerRuntimeException(String msg) { super(msg); } SofaTracerRuntimeException(String msg);  SofaTracerRuntimeException(String desc, Throwable t); @Override String toString();  }
@Test public void testSofaTracerRuntimeException() { try { buildSofaTracerRuntimeExceptionNpe(); } catch (SofaTracerRuntimeException e) { Assert.assertEquals("NullPointException occurs;", e.toString()); } try { buildSofaTracerRuntimeException(); } catch (SofaTracerRuntimeException e) { Assert.assertTrue(e.getMessage().contains("Unsupported extractor format:")); } }