@Test
public void testLocalizedSamplingStrategyWithThreeRules() {

    URL emptySamplingRules = LocalizedSamplingStrategyTest.class.getResource(
        "/com/amazonaws/xray/strategy/sampling/ThreeSamplingRules.json");
    LocalizedSamplingStrategy localizedSamplingStrategy = new LocalizedSamplingStrategy(emptySamplingRules);
    SamplingRequest r1 = new SamplingRequest("", "test", "/test", "test", "");
    SamplingResponse s1 = localizedSamplingStrategy.shouldTrace(r1);
    Assert.assertFalse(s1.isSampled());
    SamplingRequest r2 = new SamplingRequest("", "test2", "/test", "test", "");
    SamplingResponse s2 = localizedSamplingStrategy.shouldTrace(r2);
    Assert.assertTrue(s2.isSampled());
    SamplingRequest r3 = new SamplingRequest("", "no", "/test", "test", "");
    SamplingResponse s3 = localizedSamplingStrategy.shouldTrace(r3);
    Assert.assertFalse(s3.isSampled());
}