SamplingStrategyErrorException extends RuntimeException { public SamplingStrategyErrorException(String msg) { super(msg); } SamplingStrategyErrorException(String msg);  SamplingStrategyErrorException(String msg, Throwable cause);   }
@Test public void testSamplingStrategyErrorException() { try { buildSamplingStrategyErrorExceptionWithThrowable(); } catch (SamplingStrategyErrorException e) { Assert.assertEquals("sampler init failed;", e.getMessage()); } try { buildSamplingStrategyErrorException(); } catch (SamplingStrategyErrorException e) { Assert.assertEquals("SamplerProperties is null", e.getMessage()); } }