From e7eaa24db9444d5397f0b2e135de85dd9d69821d Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Tue, 17 May 2022 20:29:10 +0300 Subject: [PATCH] fix spotless #2 (remove dependency) --- ethereum/executionclient/build.gradle | 1 - .../rest/RestExecutionBuilderClientTest.java | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ethereum/executionclient/build.gradle b/ethereum/executionclient/build.gradle index 88cf5373321..81ffaa3c283 100644 --- a/ethereum/executionclient/build.gradle +++ b/ethereum/executionclient/build.gradle @@ -21,6 +21,5 @@ dependencies { integrationTestImplementation testFixtures(project(':infrastructure:json')) integrationTestImplementation testFixtures(project(':infrastructure:time')) - integrationTestImplementation project(':data:serializer') integrationTestImplementation 'com.squareup.okhttp3:mockwebserver' } diff --git a/ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClientTest.java b/ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClientTest.java index dd9681a37d2..8595c2b5755 100644 --- a/ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClientTest.java +++ b/ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClientTest.java @@ -39,7 +39,6 @@ import tech.pegasys.teku.infrastructure.json.JsonUtil; import tech.pegasys.teku.infrastructure.json.types.DeserializableTypeDefinition; import tech.pegasys.teku.infrastructure.unsigned.UInt64; -import tech.pegasys.teku.provider.JsonProvider; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.TestSpecContext; @@ -56,7 +55,7 @@ network = {Eth2Network.MAINNET}) class RestExecutionBuilderClientTest { - private static final JsonProvider JSON_PROVIDER = new JsonProvider(); + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final Duration WAIT_FOR_CALL_COMPLETION = Duration.ofSeconds(10); @@ -314,9 +313,8 @@ private void verifyRequest( assertThat(actualRequestBody.size()).isZero(); } else { assertThat(actualRequestBody.size()).isNotZero(); - ObjectMapper jsonMapper = JSON_PROVIDER.getObjectMapper(); - assertThat(jsonMapper.readTree(expectedRequestBody.get())) - .isEqualTo(jsonMapper.readTree(actualRequestBody.readUtf8())); + assertThat(OBJECT_MAPPER.readTree(expectedRequestBody.get())) + .isEqualTo(OBJECT_MAPPER.readTree(actualRequestBody.readUtf8())); } } catch (InterruptedException | JsonProcessingException ex) { Assertions.fail(ex);