diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java index 82a5437db..4e443867a 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java @@ -1477,19 +1477,18 @@ private static void insert(ArrayList a) { .build()); a.add( RpcMethodMapping.newBuilder(48, objects.insert) - .withApplicable(TestRetryConformance::isPreconditionsProvided) + .withApplicable(not(TestRetryConformance::isPreconditionsProvided)) + .withSetup(defaultSetup.andThen(blobInfoWithGenerationZero)) .withTest( - blobInfoWithGenerationZero.andThen( - (ctx, c) -> - ctx.map( - state -> - state.with( - ctx.getStorage() - .create( - ctx.getState().getBlobInfo(), - new ByteArrayInputStream( - c.getHelloWorldUtf8Bytes()), - BlobWriteOption.generationMatch()))))) + (ctx, c) -> + ctx.map( + state -> + state.with( + ctx.getStorage() + .create( + ctx.getState().getBlobInfo(), + new ByteArrayInputStream(c.getHelloWorldUtf8Bytes()), + BlobWriteOption.generationMatch())))) .build()); a.add( RpcMethodMapping.newBuilder(49, objects.insert) @@ -1717,17 +1716,16 @@ private static void insert(ArrayList a) { a.add( RpcMethodMapping.newBuilder(114, objects.insert) .withApplicable(not(TestRetryConformance::isPreconditionsProvided)) + .withSetup(defaultSetup.andThen(blobInfoWithoutGeneration)) .withTest( - blobInfoWithoutGeneration.andThen( - (ctx, c) -> - ctx.map( - state -> - state.with( - ctx.getStorage() - .create( - ctx.getState().getBlobInfo(), - new ByteArrayInputStream( - c.getHelloWorldUtf8Bytes())))))) + (ctx, c) -> + ctx.map( + state -> + state.with( + ctx.getStorage() + .create( + ctx.getState().getBlobInfo(), + new ByteArrayInputStream(c.getHelloWorldUtf8Bytes()))))) .build()); a.add( RpcMethodMapping.newBuilder(115, objects.insert)