MCPcopy Create free account
hub / github.com/grpc/grpc-java / toBuilder

Method toBuilder

api/src/test/java/io/grpc/AttributesTest.java:52–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 @Test
53 public void toBuilder() {
54 Attributes attrs = Attributes.newBuilder()
55 .set(YOLO_KEY, "To be?")
56 .build()
57 .toBuilder()
58 .set(YOLO_KEY, "Or not to be?")
59 .set(Attributes.Key.create("yolo"), "I'm not a duplicate")
60 .build();
61 assertThat(attrs.get(YOLO_KEY)).isEqualTo("Or not to be?");
62 assertThat(attrs.keysForTest()).hasSize(2);
63 }
64
65 @Test
66 public void empty() {

Callers 15

idempotentMethod · 0.45
safeMethod · 0.45
safeImpliesIdempotentMethod · 0.45
safeAndNonUnaryMethod · 0.45
sampledToLocalTracingMethod · 0.45
toBuilderTestMethod · 0.45
correctHandlerCalledMethod · 0.45
discard_emptyMethod · 0.45
argsMethod · 0.45

Calls 6

newBuilderMethod · 0.95
getMethod · 0.95
keysForTestMethod · 0.95
buildMethod · 0.65
setMethod · 0.65
createMethod · 0.65

Tested by

no test coverage detected