@Test
public void testBeginSegment_canSetRuleName() {

    Segment segment = AWSXRay.beginSegment("test");
    segment.setRuleName("rule");
    assertThat(segment.getAws().get("xray")).isInstanceOfSatisfying(
        Map.class, xray -> assertThat(xray.get("rule_name")).isEqualTo("rule"));
}