diff --git a/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v1/beacon/PostAttesterSlashingIntegrationTest.java b/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v1/beacon/PostAttesterSlashingIntegrationTest.java index 92d670a017d..142d14ee5b4 100644 --- a/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v1/beacon/PostAttesterSlashingIntegrationTest.java +++ b/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v1/beacon/PostAttesterSlashingIntegrationTest.java @@ -62,9 +62,7 @@ public void shouldReturnServerErrorWhenUnexpectedErrorHappens() throws Exception final Response response = post( PostAttesterSlashing.ROUTE, - JsonUtil.serialize( - slashing, - slashing.getSchema().castTypeToAttesterSlashingSchema().getJsonTypeDefinition())); + JsonUtil.serialize(slashing, slashing.getSchema().getJsonTypeDefinition())); assertThat(response.code()).isEqualTo(SC_INTERNAL_SERVER_ERROR); } @@ -78,9 +76,7 @@ public void shouldReturnSuccessWhenRequestBodyIsValid() throws Exception { final Response response = post( PostAttesterSlashing.ROUTE, - JsonUtil.serialize( - slashing, - slashing.getSchema().castTypeToAttesterSlashingSchema().getJsonTypeDefinition())); + JsonUtil.serialize(slashing, slashing.getSchema().getJsonTypeDefinition())); verify(attesterSlashingPool).addLocal(slashing); diff --git a/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v2/beacon/PostAttesterSlashingV2IntegrationTest.java b/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v2/beacon/PostAttesterSlashingV2IntegrationTest.java index a9905fbaec2..ec8a79a9c54 100644 --- a/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v2/beacon/PostAttesterSlashingV2IntegrationTest.java +++ b/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v2/beacon/PostAttesterSlashingV2IntegrationTest.java @@ -81,9 +81,7 @@ public void shouldReturnServerErrorWhenUnexpectedErrorHappens() throws Exception final Response response = post( PostAttesterSlashingV2.ROUTE, - JsonUtil.serialize( - slashing, - slashing.getSchema().castTypeToAttesterSlashingSchema().getJsonTypeDefinition()), + JsonUtil.serialize(slashing, slashing.getSchema().getJsonTypeDefinition()), Collections.emptyMap(), Optional.of(specMilestone.name().toLowerCase(Locale.ROOT))); assertThat(response.code()).isEqualTo(500); @@ -99,9 +97,7 @@ public void shouldReturnSuccessWhenRequestBodyIsValid() throws Exception { final Response response = post( PostAttesterSlashingV2.ROUTE, - JsonUtil.serialize( - slashing, - slashing.getSchema().castTypeToAttesterSlashingSchema().getJsonTypeDefinition()), + JsonUtil.serialize(slashing, slashing.getSchema().getJsonTypeDefinition()), Collections.emptyMap(), Optional.of(specMilestone.name().toLowerCase(Locale.ROOT))); @@ -117,9 +113,7 @@ void shouldFailWhenMissingConsensusHeader() throws Exception { final Response response = post( PostAttesterSlashingV2.ROUTE, - JsonUtil.serialize( - slashing, - slashing.getSchema().castTypeToAttesterSlashingSchema().getJsonTypeDefinition())); + JsonUtil.serialize(slashing, slashing.getSchema().getJsonTypeDefinition())); assertThat(response.code()).isEqualTo(SC_BAD_REQUEST); @@ -139,9 +133,7 @@ void shouldFailWhenBadConsensusHeaderValue() throws Exception { final Response response = post( PostAttesterSlashingV2.ROUTE, - JsonUtil.serialize( - slashing, - slashing.getSchema().castTypeToAttesterSlashingSchema().getJsonTypeDefinition()), + JsonUtil.serialize(slashing, slashing.getSchema().getJsonTypeDefinition()), Collections.emptyMap(), Optional.of(badConsensusHeaderValue));