@@ -179,7 +179,6 @@ public void testInvalidSecret() {
179179 resolveWithContext (
180180 List .of ("flags/asd" ),
181181 "foo" ,
182- "bar" ,
183182 Struct .newBuilder ().build (),
184183 true ,
185184 "invalid-secret" ))
@@ -189,19 +188,17 @@ public void testInvalidSecret() {
189188 @ Test
190189 public void testInvalidFlag () {
191190 final var response =
192- resolveWithContext (List .of ("flags/asd" ), "foo" , "bar" , Struct .newBuilder ().build (), false );
191+ resolveWithContext (List .of ("flags/asd" ), "foo" , Struct .newBuilder ().build (), false );
193192 assertThat (response .getResolvedFlagsList ()).isEmpty ();
194193 assertThat (response .getResolveId ()).isNotEmpty ();
195194 }
196195
197196 @ Test
198197 public void testResolveFlag () {
199198 final var response =
200- resolveWithContext (List .of (flag1 ), "foo" , "bar" , Struct .newBuilder ().build (), true );
199+ resolveWithContext (List .of (flag1 ), "foo" , Struct .newBuilder ().build (), true );
201200 assertThat (response .getResolveId ()).isNotEmpty ();
202- final Struct expectedValue =
203- // expanded with nulls to match schema
204- variantOn .getValue ().toBuilder ().putFields ("extra" , Values .ofNull ()).build ();
201+ final Struct expectedValue = variantOn .getValue ();
205202
206203 assertEquals (variantOn .getName (), response .getResolvedFlags (0 ).getVariant ());
207204 assertEquals (expectedValue , response .getResolvedFlags (0 ).getValue ());
@@ -211,11 +208,9 @@ public void testResolveFlag() {
211208 @ Test
212209 public void testResolveFlagWithEncryptedResolveToken () {
213210 final var response =
214- resolveWithContext (List .of (flag1 ), "foo" , "bar" , Struct .newBuilder ().build (), false );
211+ resolveWithContext (List .of (flag1 ), "foo" , Struct .newBuilder ().build (), false );
215212 assertThat (response .getResolveId ()).isNotEmpty ();
216- final Struct expectedValue =
217- // expanded with nulls to match schema
218- variantOn .getValue ().toBuilder ().putFields ("extra" , Values .ofNull ()).build ();
213+ final Struct expectedValue = variantOn .getValue ();
219214
220215 assertEquals (variantOn .getName (), response .getResolvedFlags (0 ).getVariant ());
221216 assertEquals (expectedValue , response .getResolvedFlags (0 ).getValue ());
@@ -255,15 +250,14 @@ public void testTooLongKey() {
255250 .isThrownBy (
256251 () ->
257252 resolveWithContext (
258- List .of (flag1 ), "a" .repeat (101 ), "bar" , Struct .newBuilder ().build (), false ))
253+ List .of (flag1 ), "a" .repeat (101 ), Struct .newBuilder ().build (), false ))
259254 .withMessageContaining ("Targeting key is too larger, max 100 characters." );
260255 }
261256
262257 @ Test
263258 public void testResolveIntegerTargetingKeyTyped () {
264259 final var response =
265- resolveWithNumericTargetingKey (
266- List .of (flag1 ), 1234567890 , "bar" , Struct .newBuilder ().build (), true );
260+ resolveWithNumericTargetingKey (List .of (flag1 ), 1234567890 , Struct .newBuilder ().build ());
267261
268262 assertThat (response .getResolvedFlagsList ()).hasSize (1 );
269263 assertEquals (ResolveReason .RESOLVE_REASON_MATCH , response .getResolvedFlags (0 ).getReason ());
@@ -272,8 +266,7 @@ public void testResolveIntegerTargetingKeyTyped() {
272266 @ Test
273267 public void testResolveDecimalUsername () {
274268 final var response =
275- resolveWithNumericTargetingKey (
276- List .of (flag1 ), 3.14159d , "bar" , Struct .newBuilder ().build (), true );
269+ resolveWithNumericTargetingKey (List .of (flag1 ), 3.14159d , Struct .newBuilder ().build ());
277270
278271 assertThat (response .getResolvedFlagsList ()).hasSize (1 );
279272 assertEquals (
0 commit comments