From c8a0ef3e0e6e8591d4c07c46f508d6f9641d62d2 Mon Sep 17 00:00:00 2001 From: julia zack Date: Fri, 6 Oct 2023 11:26:46 -0300 Subject: [PATCH] Refactor test names. Remove unnecessary casting --- .../src/test/java/co/rsk/peg/FederationSupportTest.java | 2 +- .../java/co/rsk/peg/StandardMultisigFederationTest.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rskj-core/src/test/java/co/rsk/peg/FederationSupportTest.java b/rskj-core/src/test/java/co/rsk/peg/FederationSupportTest.java index 8b2b9aa9c5c..46f550c1662 100644 --- a/rskj-core/src/test/java/co/rsk/peg/FederationSupportTest.java +++ b/rskj-core/src/test/java/co/rsk/peg/FederationSupportTest.java @@ -74,7 +74,7 @@ void whenNewFederationIsNullThenActiveFederationIsGenesisFederation() { when(provider.getNewFederation()) .thenReturn(null); when(bridgeConstants.getGenesisFederation()) - .thenReturn((StandardMultisigFederation) genesisFederation); + .thenReturn(genesisFederation); assertThat(federationSupport.getActiveFederation(), is(genesisFederation)); } diff --git a/rskj-core/src/test/java/co/rsk/peg/StandardMultisigFederationTest.java b/rskj-core/src/test/java/co/rsk/peg/StandardMultisigFederationTest.java index d2ce6808d77..8cca1a85abe 100644 --- a/rskj-core/src/test/java/co/rsk/peg/StandardMultisigFederationTest.java +++ b/rskj-core/src/test/java/co/rsk/peg/StandardMultisigFederationTest.java @@ -121,7 +121,7 @@ void redeemScript() { } @Test - void testArrayEquals_P2SHScript() { + void getP2SHScript() { ScriptBuilder p2shScriptBuilder = new ScriptBuilder(); p2shScriptBuilder.op(ScriptOpCodes.OP_HASH160); p2shScriptBuilder.data(Hex.decode("57f76bf3ab818811c740929ac7a5e3ef8c7a34b9")); @@ -129,11 +129,11 @@ void testArrayEquals_P2SHScript() { Script p2shScript = p2shScriptBuilder.build(); - Assertions.assertArrayEquals(federation.getP2SHScript().getProgram(), p2shScript.getProgram()); + Assertions.assertEquals(federation.getP2SHScript(), p2shScript); } @Test - void testEquals_Address() { + void getAddress() { Assertions.assertEquals("2N1GMB8gxHYR5HLPSRgf9CJ9Lunjb9CTnKB", federation.getAddress().toBase58()); }