@Test public void testHas() { assertFalse(BaggageContents.contains(myname, ByteString.copyFrom("not-exist".getBytes()))); Baggage.discard(); try { assertFalse(BaggageContents.contains(myname, null)); assertFalse(BaggageContents.contains(myname, ByteString.copyFrom("not-exist".getBytes()))); BaggageContents.add(myname, ByteString.copyFrom("exist".getBytes()), ByteString.copyFrom("val".getBytes())); assertTrue(BaggageContents.contains(myname, ByteString.copyFrom("exist".getBytes()))); } finally { Baggage.discard(); } assertFalse(BaggageContents.contains(myname, ByteString.copyFrom("exist".getBytes()))); }
public static void discard() { current.remove(); }
Baggage { public static void discard() { current.remove(); } }
Baggage { public static void discard() { current.remove(); } private  Baggage(); }
Baggage { public static void discard() { current.remove(); } private  Baggage(); static void start(); static void discard(); static DetachedBaggage stop(); static void start(DetachedBaggage baggage); static DetachedBaggage swap(DetachedBaggage baggage); static void start(ByteString baggageBytes); static void start(byte[] baggageBytes); static void start(String base64Baggage); static DetachedBaggage fork(); static void join(DetachedBaggage otherBaggage); static void join(byte[] baggageBytes); static void join(ByteString baggageBytes); static void join(String base64baggage); }
Baggage { public static void discard() { current.remove(); } private  Baggage(); static void start(); static void discard(); static DetachedBaggage stop(); static void start(DetachedBaggage baggage); static DetachedBaggage swap(DetachedBaggage baggage); static void start(ByteString baggageBytes); static void start(byte[] baggageBytes); static void start(String base64Baggage); static DetachedBaggage fork(); static void join(DetachedBaggage otherBaggage); static void join(byte[] baggageBytes); static void join(ByteString baggageBytes); static void join(String base64baggage);  }