### Question:
Samplers { public static SamplingResult samplingResult(Decision decision, Attributes attributes) { Objects.requireNonNull(attributes, "attributes"); return attributes.isEmpty() ? emptySamplingResult(decision) : SamplingResultImpl.create(decision, attributes); } private  Samplers(); static SamplingResult samplingResult(Decision decision, Attributes attributes); static SamplingResult emptySamplingResult(Decision decision); static Sampler alwaysOn(); static Sampler alwaysOff(); static Sampler parentBased(Sampler root); static ParentBased.Builder parentBasedBuilder(Sampler root); static Sampler traceIdRatioBased(double ratio);  }### Answer:
@Test void samplingDecisionAttrs() { final Attributes attrs = Attributes.of(longKey("foo"), 42L, stringKey("bar"), "baz"); final SamplingResult sampledSamplingResult = Samplers.samplingResult(Sampler.Decision.RECORD_AND_SAMPLE, attrs); assertThat(sampledSamplingResult.getDecision()).isEqualTo(Decision.RECORD_AND_SAMPLE); assertThat(sampledSamplingResult.getAttributes()).isEqualTo(attrs); final SamplingResult notSampledSamplingResult = Samplers.samplingResult(Sampler.Decision.DROP, attrs); assertThat(notSampledSamplingResult.getDecision()).isEqualTo(Decision.DROP); assertThat(notSampledSamplingResult.getAttributes()).isEqualTo(attrs); }