diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/AccountAutoRenewalSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/AccountAutoRenewalSuite.java index 33371a4d25c3..fb093bd91323 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/AccountAutoRenewalSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/AccountAutoRenewalSuite.java @@ -75,7 +75,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec accountAutoRemoval() { + final HapiSpec accountAutoRemoval() { String autoRemovedAccount = "autoRemovedAccount"; return defaultHapiSpec("AccountAutoRemoval") .given( @@ -93,7 +93,7 @@ private HapiSpec accountAutoRemoval() { .then(getAccountBalance(autoRemovedAccount).hasAnswerOnlyPrecheck(INVALID_ACCOUNT_ID)); } - private HapiSpec accountAutoRenewal() { + final HapiSpec accountAutoRenewal() { final var briefAutoRenew = 3L; final var autoRenewedAccount = "autoRenewedAccount"; @@ -130,7 +130,7 @@ private HapiSpec accountAutoRenewal() { * periods, this test is just a minimal sanity check. */ @SuppressWarnings("java:S5960") - private HapiSpec maxNumberOfEntitiesToRenewOrDeleteWorks() { + final HapiSpec maxNumberOfEntitiesToRenewOrDeleteWorks() { final var briefAutoRenew = 3L; final var firstTouchable = "a"; final var secondTouchable = "b"; @@ -185,7 +185,7 @@ private HapiSpec maxNumberOfEntitiesToRenewOrDeleteWorks() { *

If run against a network that has existing funded accounts with very low auto-renew * periods, this test is just a minimal sanity check. */ - private HapiSpec numberOfEntitiesToScanWorks() { + final HapiSpec numberOfEntitiesToScanWorks() { final var briefAutoRenew = 3L; final int abbrevMaxToScan = 10; final IntFunction accountName = i -> "fastExpiring" + i; @@ -224,7 +224,7 @@ private HapiSpec numberOfEntitiesToScanWorks() { })); } - private HapiSpec autoDeleteAfterGracePeriod() { + final HapiSpec autoDeleteAfterGracePeriod() { final var briefAutoRenew = 3L; String autoDeleteAccount = "autoDeleteAccount"; return defaultHapiSpec("AutoDeleteAfterGracePeriod") @@ -245,14 +245,14 @@ private HapiSpec autoDeleteAfterGracePeriod() { .then(getAccountBalance(autoDeleteAccount).hasAnswerOnlyPrecheck(INVALID_ACCOUNT_ID)); } - private HapiSpec accountAutoRenewalSuiteCleanup() { + final HapiSpec accountAutoRenewalSuiteCleanup() { return defaultHapiSpec("accountAutoRenewalSuiteCleanup") .given() .when() .then(fileUpdate(APP_PROPERTIES).payingWith(GENESIS).overridingProps(disablingAutoRenewWithDefaults())); } - private HapiSpec freezeAtTheEnd() { + final HapiSpec freezeAtTheEnd() { return defaultHapiSpec("freezeAtTheEnd") .given() .when(freezeOnly().startingIn(30).seconds().payingWith(GENESIS)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/AutoRemovalCasesSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/AutoRemovalCasesSuite.java index a819f2e2b38c..f57d9fea94fe 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/AutoRemovalCasesSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/AutoRemovalCasesSuite.java @@ -63,7 +63,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec ignoresExpiredDeletedContracts() { + final HapiSpec ignoresExpiredDeletedContracts() { final var adminKey = "tac"; final var tbd = "dead"; @@ -79,7 +79,7 @@ private HapiSpec ignoresExpiredDeletedContracts() { .then(getContractInfo(tbd).hasCostAnswerPrecheck(INVALID_CONTRACT_ID)); } - private HapiSpec immediatelyRemovesDeletedAccountOnExpiry() { + final HapiSpec immediatelyRemovesDeletedAccountOnExpiry() { final var tbd = "dead"; final var onlyDetached = "gone"; @@ -95,7 +95,7 @@ private HapiSpec immediatelyRemovesDeletedAccountOnExpiry() { .then(getAccountInfo(onlyDetached), getAccountInfo(tbd).hasCostAnswerPrecheck(INVALID_ACCOUNT_ID)); } - private HapiSpec displacesTokenUnitsAsExpected() { + final HapiSpec displacesTokenUnitsAsExpected() { final long startSupply = 10; final long displacedSupply = 1; final var adminKey = "tak"; @@ -137,7 +137,7 @@ private HapiSpec displacesTokenUnitsAsExpected() { .hasTokenBalance(anotherLiveToken, startSupply)); } - private HapiSpec autoRemovalCasesSuiteCleanup() { + final HapiSpec autoRemovalCasesSuiteCleanup() { return defaultHapiSpec("AutoRemovalCasesSuiteCleanup") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/ContractAutoExpirySpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/ContractAutoExpirySpecs.java index 106638cc806b..1d689daa7dc6 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/ContractAutoExpirySpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/ContractAutoExpirySpecs.java @@ -105,7 +105,7 @@ public List getSpecsInSuite() { verifyNonFungibleTokenTransferredBackToTreasuryWithoutCharging()); } - private HapiSpec renewalWithCustomFeesWorks() { + final HapiSpec renewalWithCustomFeesWorks() { final var minimalLifetime = 4; final var aFungibleToken = "aFT"; final var bFungibleToken = "bFT"; @@ -175,7 +175,7 @@ private HapiSpec renewalWithCustomFeesWorks() { getTokenNftInfo(nonFungibleToken, 2L).hasAccountID(TOKEN_TREASURY)); } - private HapiSpec receiverSigReqBypassedForTreasuryAtEndOfGracePeriod() { + final HapiSpec receiverSigReqBypassedForTreasuryAtEndOfGracePeriod() { final var minimalLifetime = 4; final var aFungibleToken = "aFT"; final var nonFungibleToken = "NFT"; @@ -242,14 +242,14 @@ private HapiSpec receiverSigReqBypassedForTreasuryAtEndOfGracePeriod() { getTokenNftInfo(nonFungibleToken, 2L).hasAccountID(TOKEN_TREASURY)); } - private HapiSpec validateStreams() { + final HapiSpec validateStreams() { return defaultHapiSpec("validateStreams") .given() .when() .then(sourcing(() -> assertEventuallyPasses(new ExpiryRecordsValidator(), Duration.ofMillis(2_100)))); } - private HapiSpec storageRentChargedOnlyAfterInitialFreePeriodIsComplete() { + final HapiSpec storageRentChargedOnlyAfterInitialFreePeriodIsComplete() { final var contract = "User"; final var gasToOffer = 1_000_000; final var minimalLifetime = 4; @@ -338,7 +338,7 @@ private HapiSpec storageRentChargedOnlyAfterInitialFreePeriodIsComplete() { overriding(INDIVIDUAL_KV_LIMIT_PROP, String.valueOf(16_384_000))); } - private HapiSpec autoRenewWorksAsExpected() { + final HapiSpec autoRenewWorksAsExpected() { final var minimalLifetime = 3; return defaultHapiSpec("autoRenewWorksAsExpected") @@ -386,7 +386,7 @@ private HapiSpec autoRenewWorksAsExpected() { overriding(LEDGER_AUTO_RENEW_PERIOD_MIN_DURATION, DEFAULT_MIN_AUTO_RENEW_PERIOD)); } - private HapiSpec autoRenewInGracePeriodIfEnoughBalance() { + final HapiSpec autoRenewInGracePeriodIfEnoughBalance() { final var minimalLifetime = 3; final var expectedExpiryPostRenew = new AtomicLong(); final var currentExpiry = new AtomicLong(); @@ -446,7 +446,7 @@ private HapiSpec autoRenewInGracePeriodIfEnoughBalance() { overriding(LEDGER_AUTO_RENEW_PERIOD_MIN_DURATION, DEFAULT_MIN_AUTO_RENEW_PERIOD)); } - private HapiSpec renewalFeeDistributedToStakingAccounts() { + final HapiSpec renewalFeeDistributedToStakingAccounts() { final var initBalance = ONE_HBAR; final var minimalLifetime = 3; final var standardLifetime = 7776000L; @@ -519,7 +519,7 @@ private HapiSpec renewalFeeDistributedToStakingAccounts() { overriding(LEDGER_AUTO_RENEW_PERIOD_MIN_DURATION, DEFAULT_MIN_AUTO_RENEW_PERIOD)); } - private HapiSpec chargesContractFundsWhenAutoRenewAccountHasZeroBalance() { + final HapiSpec chargesContractFundsWhenAutoRenewAccountHasZeroBalance() { final var initBalance = ONE_HBAR; final var minimalLifetime = 3; final var standardLifetime = 7776000L; @@ -587,7 +587,7 @@ private HapiSpec chargesContractFundsWhenAutoRenewAccountHasZeroBalance() { overriding(LEDGER_AUTO_RENEW_PERIOD_MIN_DURATION, DEFAULT_MIN_AUTO_RENEW_PERIOD)); } - private HapiSpec renewsUsingAutoRenewAccountIfSet() { + final HapiSpec renewsUsingAutoRenewAccountIfSet() { final var initBalance = ONE_HBAR; final var minimalLifetime = 3; final var standardLifetime = 7776000L; @@ -654,7 +654,7 @@ private HapiSpec renewsUsingAutoRenewAccountIfSet() { overriding(LEDGER_AUTO_RENEW_PERIOD_MIN_DURATION, DEFAULT_MIN_AUTO_RENEW_PERIOD)); } - private HapiSpec storageExpiryWorksAtTheExpectedInterval() { + final HapiSpec storageExpiryWorksAtTheExpectedInterval() { final var minimalLifetime = 4; final var aFungibleToken = "aFT"; final var bFungibleToken = "bFT"; @@ -748,7 +748,7 @@ private HapiSpec storageExpiryWorksAtTheExpectedInterval() { getAccountBalance(TOKEN_TREASURY).hasTinyBars(ONE_HBAR)); } - private HapiSpec verifyNonFungibleTokenTransferredBackToTreasuryWithoutCharging() { + final HapiSpec verifyNonFungibleTokenTransferredBackToTreasuryWithoutCharging() { final var minimalLifetime = 4; final var nonFungibleToken = "NFT"; final var initBalance = ONE_HBAR; @@ -801,7 +801,7 @@ private HapiSpec verifyNonFungibleTokenTransferredBackToTreasuryWithoutCharging( getAccountBalance(TOKEN_TREASURY).hasTinyBars(ONE_HBAR)); } - private HapiSpec renewsUsingContractFundsIfNoAutoRenewAccount() { + final HapiSpec renewsUsingContractFundsIfNoAutoRenewAccount() { final var initBalance = ONE_HBAR; final var minimalLifetime = 3; final var standardLifetime = 7776000L; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/GracePeriodRestrictionsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/GracePeriodRestrictionsSuite.java index bcfd0d5ffe66..0ade4298f25c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/GracePeriodRestrictionsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/GracePeriodRestrictionsSuite.java @@ -94,7 +94,7 @@ public List getSpecsInSuite() { gracePeriodRestrictionsSuiteCleanup()); } - private HapiSpec contractCallRestrictionsEnforced() { + final HapiSpec contractCallRestrictionsEnforced() { final var civilian = "misc"; final var detachedAccount = "gone"; final var contract = "DoubleSend"; @@ -134,7 +134,7 @@ contract, getABIFor(FUNCTION, "donate", contract), new Object[] { getAccountBalance(detachedAccount).hasTinyBars(1L)); } - private HapiSpec cryptoUpdateRestrictionsEnforced() { + final HapiSpec cryptoUpdateRestrictionsEnforced() { final var detachedAccount = "gone"; final long certainlyPast = Instant.now().getEpochSecond() - THREE_MONTHS_IN_SECONDS; final long certainlyDistant = Instant.now().getEpochSecond() + THREE_MONTHS_IN_SECONDS; @@ -177,7 +177,7 @@ private HapiSpec cryptoUpdateRestrictionsEnforced() { .hasKnownStatus(EXPIRATION_REDUCTION_NOT_ALLOWED)); } - private HapiSpec payerRestrictionsEnforced() { + final HapiSpec payerRestrictionsEnforced() { final var detachedAccount = "gone"; return defaultHapiSpec("PayerRestrictionsEnforced") @@ -199,7 +199,7 @@ private HapiSpec payerRestrictionsEnforced() { .hasKnownStatus(ACCOUNT_EXPIRED_AND_PENDING_REMOVAL)); } - private HapiSpec topicAutoRenewOpsEnforced() { + final HapiSpec topicAutoRenewOpsEnforced() { final var topicWithDetachedAsAutoRenew = "c"; final var topicSansDetachedAsAutoRenew = "d"; final var detachedAccount = "gone"; @@ -236,7 +236,7 @@ private HapiSpec topicAutoRenewOpsEnforced() { getTopicInfo(topicWithDetachedAsAutoRenew).hasAutoRenewAccount(detachedAccount)); } - private HapiSpec tokenAutoRenewOpsEnforced() { + final HapiSpec tokenAutoRenewOpsEnforced() { final var tokenWithDetachedAsAutoRenew = "c"; final var tokenSansDetachedAsAutoRenew = "d"; final var detachedAccount = "gone"; @@ -272,7 +272,7 @@ private HapiSpec tokenAutoRenewOpsEnforced() { getTokenInfo(tokenWithDetachedAsAutoRenew).hasAutoRenewAccount(detachedAccount)); } - private HapiSpec treasuryOpsRestrictionEnforced() { + final HapiSpec treasuryOpsRestrictionEnforced() { final var aToken = "c"; final var detachedAccount = "gone"; final var tokenMultiKey = "tak"; @@ -301,7 +301,7 @@ private HapiSpec treasuryOpsRestrictionEnforced() { getAccountBalance(detachedAccount).hasTokenBalance(aToken, expectedSupply)); } - private HapiSpec tokenMgmtRestrictionsEnforced() { + final HapiSpec tokenMgmtRestrictionsEnforced() { final var notToBe = "a"; final var tokenNotYetAssociated = "b"; final var tokenAlreadyAssociated = "c"; @@ -345,7 +345,7 @@ private HapiSpec tokenMgmtRestrictionsEnforced() { .hasKnownStatus(ACCOUNT_EXPIRED_AND_PENDING_REMOVAL)); } - private HapiSpec cryptoAndContractDeleteRestrictionsEnforced() { + final HapiSpec cryptoAndContractDeleteRestrictionsEnforced() { final var detachedAccount = "gone"; final var civilian = "misc"; final var tbd = "contract"; @@ -372,7 +372,7 @@ private HapiSpec cryptoAndContractDeleteRestrictionsEnforced() { .hasKnownStatus(ACCOUNT_EXPIRED_AND_PENDING_REMOVAL)); } - private HapiSpec cryptoTransferRestrictionsEnforced() { + final HapiSpec cryptoTransferRestrictionsEnforced() { final var aToken = "c"; final var detachedAccount = "gone"; final var civilian = "misc"; @@ -395,7 +395,7 @@ private HapiSpec cryptoTransferRestrictionsEnforced() { .hasKnownStatus(ACCOUNT_EXPIRED_AND_PENDING_REMOVAL)); } - private HapiSpec gracePeriodRestrictionsSuiteSetup() { + final HapiSpec gracePeriodRestrictionsSuiteSetup() { return defaultHapiSpec("GracePeriodRestrictionsSuiteSetup") .given() .when() @@ -404,7 +404,7 @@ private HapiSpec gracePeriodRestrictionsSuiteSetup() { .overridingProps(propsForAccountAutoRenewOnWith(1, 3600))); } - private HapiSpec gracePeriodRestrictionsSuiteCleanup() { + final HapiSpec gracePeriodRestrictionsSuiteCleanup() { return defaultHapiSpec("GracePeriodRestrictionsSuiteCleanup") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/MacroFeesChargedSanityCheckSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/MacroFeesChargedSanityCheckSuite.java index 12cca596ef51..dfd74ad25be9 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/MacroFeesChargedSanityCheckSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/MacroFeesChargedSanityCheckSuite.java @@ -78,7 +78,7 @@ public List getSpecsInSuite() { } @SuppressWarnings("java:S125") - private HapiSpec renewalCappedByAffordablePeriod() { + final HapiSpec renewalCappedByAffordablePeriod() { final long briefAutoRenew = 10L; final long normalAutoRenew = THREE_MONTHS_IN_SECONDS; final long threeHoursInSeconds = 3 * 3600L; @@ -130,7 +130,7 @@ private HapiSpec renewalCappedByAffordablePeriod() { } @SuppressWarnings("java:S5960") - private HapiSpec feesChargedMatchNumberOfRenewals() { + final HapiSpec feesChargedMatchNumberOfRenewals() { final long reqAutoRenew = 2L; final long startBalance = ONE_HUNDRED_HBARS; final var target = "czar"; @@ -229,7 +229,7 @@ private RenewalFeeComponents autoRenewFeesFor(final HapiSpec spec, final ExtantC return new RenewalFeeComponents(inTinybars(constantPrice, rates), inTinybars(variablePrice, rates)); } - private HapiSpec macroFeesChargedSanityCheckSuiteCleanup() { + final HapiSpec macroFeesChargedSanityCheckSuiteCleanup() { return defaultHapiSpec("MacroFeesChargedSanityCheckSuiteCleanup") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/NoGprIfNoAutoRenewSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/NoGprIfNoAutoRenewSuite.java index 1324f8142ab0..2aba6966d799 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/NoGprIfNoAutoRenewSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/NoGprIfNoAutoRenewSuite.java @@ -94,7 +94,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec contractCallRestrictionsNotEnforced() { + final HapiSpec contractCallRestrictionsNotEnforced() { final var civilian = "misc"; final var notDetachedAccount = "gone"; final var contract = "DoubleSend"; @@ -125,7 +125,7 @@ private HapiSpec contractCallRestrictionsNotEnforced() { getAccountBalance(notDetachedAccount).hasTinyBars(1L)); } - private HapiSpec cryptoUpdateRestrictionsNotEnforced() { + final HapiSpec cryptoUpdateRestrictionsNotEnforced() { final var notDetachedAccount = "gone"; final long certainlyPast = Instant.now().getEpochSecond() - THREE_MONTHS_IN_SECONDS; final long certainlyDistant = Instant.now().getEpochSecond() + THREE_MONTHS_IN_SECONDS; @@ -158,7 +158,7 @@ private HapiSpec cryptoUpdateRestrictionsNotEnforced() { .hasKnownStatus(EXPIRATION_REDUCTION_NOT_ALLOWED)); } - private HapiSpec payerRestrictionsNotEnforced() { + final HapiSpec payerRestrictionsNotEnforced() { final var notDetachedAccount = "gone"; return defaultHapiSpec("PayerRestrictionsEnforced") @@ -187,7 +187,7 @@ private HapiSpec payerRestrictionsNotEnforced() { .hasPriority(recordWith().status(INSUFFICIENT_PAYER_BALANCE))); } - private HapiSpec topicAutoRenewOpsNotEnforced() { + final HapiSpec topicAutoRenewOpsNotEnforced() { final var topicWithDetachedAsAutoRenew = "c"; final var topicSansDetachedAsAutoRenew = "d"; final var notDetachedAccount = "gone"; @@ -214,7 +214,7 @@ private HapiSpec topicAutoRenewOpsNotEnforced() { getTopicInfo(topicWithDetachedAsAutoRenew).hasAutoRenewAccount(civilian)); } - private HapiSpec tokenAutoRenewOpsNotEnforced() { + final HapiSpec tokenAutoRenewOpsNotEnforced() { final var tokenWithDetachedAsAutoRenew = "c"; final var tokenSansDetachedAsAutoRenew = "d"; final var notDetachedAccount = "gone"; @@ -241,7 +241,7 @@ private HapiSpec tokenAutoRenewOpsNotEnforced() { getTokenInfo(tokenWithDetachedAsAutoRenew).hasAutoRenewAccount(civilian)); } - private HapiSpec treasuryOpsRestrictionNotEnforced() { + final HapiSpec treasuryOpsRestrictionNotEnforced() { final var aToken = "c"; final var notDetachedAccount = "gone"; final var tokenMultiKey = "tak"; @@ -267,7 +267,7 @@ private HapiSpec treasuryOpsRestrictionNotEnforced() { getAccountBalance(notDetachedAccount).hasTokenBalance(aToken, 0L)); } - private HapiSpec tokenMgmtRestrictionsNotEnforced() { + final HapiSpec tokenMgmtRestrictionsNotEnforced() { final var onTheFly = "a"; final var tokenNotYetAssociated = "b"; final var tokenAlreadyAssociated = "c"; @@ -299,7 +299,7 @@ private HapiSpec tokenMgmtRestrictionsNotEnforced() { .hasKnownStatus(ACCOUNT_FROZEN_FOR_TOKEN)); } - private HapiSpec cryptoDeleteRestrictionsNotEnforced() { + final HapiSpec cryptoDeleteRestrictionsNotEnforced() { final var notDetachedAccount = "gone"; final var civilian = "misc"; @@ -313,7 +313,7 @@ private HapiSpec cryptoDeleteRestrictionsNotEnforced() { cryptoDelete(civilian).transfer(notDetachedAccount).hasKnownStatus(ACCOUNT_DELETED)); } - private HapiSpec cryptoTransferRestrictionsNotEnforced() { + final HapiSpec cryptoTransferRestrictionsNotEnforced() { final var aToken = "c"; final var notDetachedAccount = "gone"; final var civilian = "misc"; @@ -330,14 +330,14 @@ private HapiSpec cryptoTransferRestrictionsNotEnforced() { cryptoTransfer(moving(1, aToken).between(notDetachedAccount, civilian))); } - private HapiSpec noGracePeriodRestrictionsIfNoAutoRenewSuiteSetup() { + final HapiSpec noGracePeriodRestrictionsIfNoAutoRenewSuiteSetup() { return defaultHapiSpec("NoGracePeriodRestrictionsIfNoAutoRenewSuiteSetup") .given() .when() .then(fileUpdate(APP_PROPERTIES).payingWith(GENESIS).overridingProps(leavingAutoRenewDisabledWith(1))); } - private HapiSpec noGracePeriodRestrictionsIfNoAutoRenewSuiteCleanup() { + final HapiSpec noGracePeriodRestrictionsIfNoAutoRenewSuiteCleanup() { return defaultHapiSpec("NoGracePeriodRestrictionsIfNoAutoRenewSuiteCleanup") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/TopicAutoRenewalSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/TopicAutoRenewalSuite.java index b73baef5eeda..67d7d60b6d9c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/TopicAutoRenewalSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/autorenew/TopicAutoRenewalSuite.java @@ -39,11 +39,11 @@ public List getSpecsInSuite() { return List.of(topicAutoRemoval(), topicAutoRenewal()); } - private HapiSpec topicAutoRemoval() { + final HapiSpec topicAutoRemoval() { return defaultHapiSpec("").given().when().then(); } - private HapiSpec topicAutoRenewal() { + final HapiSpec topicAutoRenewal() { return defaultHapiSpec("").given().when().then(); } diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/block/BlockSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/block/BlockSuite.java index 8f5f44a983e1..f111cca19659 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/block/BlockSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/block/BlockSuite.java @@ -63,7 +63,7 @@ public List getSpecsInSuite() { @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec blck003ReturnsTimestampOfTheBlock() { + final HapiSpec blck003ReturnsTimestampOfTheBlock() { final var contract = "EmitBlockTimestamp"; final var firstCall = "firstCall"; final var secondCall = "secondCall"; @@ -126,7 +126,7 @@ private HapiSpec blck003ReturnsTimestampOfTheBlock() { } @HapiTest - private HapiSpec blck001And002And003And004ReturnsCorrectBlockProperties() { + final HapiSpec blck001And002And003And004ReturnsCorrectBlockProperties() { final var contract = "EmitBlockTimestamp"; final var firstBlock = "firstBlock"; final var secondBlock = "secondBlock"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/compose/LocalNetworkCheck.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/compose/LocalNetworkCheck.java index 43b5d7328e9c..d8c2676fbe73 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/compose/LocalNetworkCheck.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/compose/LocalNetworkCheck.java @@ -48,7 +48,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec balancesChangeOnTransfer() { + final HapiSpec balancesChangeOnTransfer() { return customHapiSpec("BalancesChangeOnTransfer") .withProperties(Map.of("nodes", "127.0.0.1:50213:0.0.3,127.0.0.1:50214:0.0.4,127.0.0.1:50215:0.0.5")) .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/compose/PerpetualLocalCalls.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/compose/PerpetualLocalCalls.java index b903ae5e7405..189803052ef8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/compose/PerpetualLocalCalls.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/compose/PerpetualLocalCalls.java @@ -63,7 +63,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec localCallsForever() { + final HapiSpec localCallsForever() { return defaultHapiSpec("LocalCallsForever") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/AssortedHcsOps.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/AssortedHcsOps.java index dcef5313be02..4b2fc6f80fc4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/AssortedHcsOps.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/AssortedHcsOps.java @@ -69,7 +69,7 @@ public List getSpecsInSuite() { final String TARGET_DIR = "./dev-system-files"; - private HapiSpec testRechargingPayer() { + final HapiSpec testRechargingPayer() { long startingBalance = 1_000_000L; return defaultHapiSpec("testRechargingPayer") @@ -83,14 +83,14 @@ private HapiSpec testRechargingPayer() { .toArray(HapiSpecOperation[]::new)); } - private HapiSpec infoLookup() { + final HapiSpec infoLookup() { return defaultHapiSpec("infoLookup") .given() .when() .then(QueryVerbs.getTopicInfo("0.0.1161").logged()); } - private HapiSpec runMisc() { + final HapiSpec runMisc() { final int SUBMIT_BURST_SIZE = 10; AtomicReference vanillaTopic = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/ChunkingSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/ChunkingSuite.java index 047b8e8e6534..03974d8627a4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/ChunkingSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/ChunkingSuite.java @@ -55,7 +55,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec chunkNumberIsValidated() { + final HapiSpec chunkNumberIsValidated() { return defaultHapiSpec("chunkNumberIsValidated") .given(createTopic("testTopic")) .when() @@ -78,7 +78,7 @@ private HapiSpec chunkNumberIsValidated() { } @HapiTest - private HapiSpec chunkTransactionIDIsValidated() { + final HapiSpec chunkTransactionIDIsValidated() { return defaultHapiSpec("chunkTransactionIDIsValidated") .given(cryptoCreate("initialTransactionPayer"), createTopic("testTopic")) .when() @@ -119,7 +119,7 @@ private HapiSpec chunkTransactionIDIsValidated() { } @HapiTest - private HapiSpec longMessageIsFragmentedIntoChunks() { + final HapiSpec longMessageIsFragmentedIntoChunks() { String fileForLongMessage = "src/main/resource/RandomLargeBinary.bin"; return defaultHapiSpec("longMessageIsFragmentedIntoChunks") .given(cryptoCreate("payer"), createTopic("testTopic")) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/SubmitMessageSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/SubmitMessageSuite.java index 31c57241e3ab..0baa5ff1fbdb 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/SubmitMessageSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/SubmitMessageSuite.java @@ -84,7 +84,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec topicIdIsValidated() { + final HapiSpec topicIdIsValidated() { return defaultHapiSpec("topicIdIsValidated") .given(cryptoCreate("nonTopicId")) .when() @@ -99,7 +99,7 @@ private HapiSpec topicIdIsValidated() { } @HapiTest - private HapiSpec messageIsValidated() { + final HapiSpec messageIsValidated() { return defaultHapiSpec("messageIsValidated") .given(createTopic("testTopic")) .when() @@ -115,7 +115,7 @@ private HapiSpec messageIsValidated() { } @HapiTest - private HapiSpec messageSubmissionSimple() { + final HapiSpec messageSubmissionSimple() { return defaultHapiSpec("messageSubmissionSimple") .given( newKeyNamed("submitKey"), @@ -129,7 +129,7 @@ private HapiSpec messageSubmissionSimple() { } @HapiTest - private HapiSpec messageSubmissionIncreasesSeqNo() { + final HapiSpec messageSubmissionIncreasesSeqNo() { KeyShape submitKeyShape = threshOf(2, SIMPLE, SIMPLE, listOf(2)); return defaultHapiSpec("messageSubmissionIncreasesSeqNo") @@ -141,7 +141,7 @@ private HapiSpec messageSubmissionIncreasesSeqNo() { } @HapiTest - private HapiSpec messageSubmissionWithSubmitKey() { + final HapiSpec messageSubmissionWithSubmitKey() { KeyShape submitKeyShape = threshOf(2, SIMPLE, SIMPLE, listOf(2)); SigControl validSig = submitKeyShape.signedWith(sigs(ON, OFF, sigs(ON, ON))); @@ -164,7 +164,7 @@ private HapiSpec messageSubmissionWithSubmitKey() { } @HapiTest - private HapiSpec messageSubmissionMultiple() { + final HapiSpec messageSubmissionMultiple() { final int numMessages = 10; return defaultHapiSpec("messageSubmissionMultiple") @@ -176,7 +176,7 @@ private HapiSpec messageSubmissionMultiple() { } @HapiTest - private HapiSpec messageSubmissionOverSize() { + final HapiSpec messageSubmissionOverSize() { final byte[] messageBytes = new byte[4096]; // 4k Arrays.fill(messageBytes, (byte) 0b1); @@ -193,7 +193,7 @@ private HapiSpec messageSubmissionOverSize() { } @HapiTest - private HapiSpec feeAsExpected() { + final HapiSpec feeAsExpected() { final byte[] messageBytes = new byte[100]; // 4k Arrays.fill(messageBytes, (byte) 0b1); return defaultHapiSpec("feeAsExpected") @@ -210,7 +210,7 @@ private HapiSpec feeAsExpected() { } @HapiTest - private HapiSpec messageSubmissionCorrectlyUpdatesRunningHash() { + final HapiSpec messageSubmissionCorrectlyUpdatesRunningHash() { String topic = "testTopic"; String message1 = "Hello world!"; String message2 = "Hello world again!"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicCreateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicCreateSuite.java index ecc0e011c7ca..c0eeb7406e96 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicCreateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicCreateSuite.java @@ -71,7 +71,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec adminKeyIsValidated() { + final HapiSpec adminKeyIsValidated() { return defaultHapiSpec("AdminKeyIsValidated") .given() .when() @@ -83,7 +83,7 @@ private HapiSpec adminKeyIsValidated() { } @HapiTest - private HapiSpec submitKeyIsValidated() { + final HapiSpec submitKeyIsValidated() { return defaultHapiSpec("SubmitKeyIsValidated") .given() .when() @@ -94,7 +94,7 @@ private HapiSpec submitKeyIsValidated() { } @HapiTest - private HapiSpec autoRenewAccountIsValidated() { + final HapiSpec autoRenewAccountIsValidated() { return defaultHapiSpec("AutoRenewAccountIsValidated") .given() .when() @@ -105,7 +105,7 @@ private HapiSpec autoRenewAccountIsValidated() { } @HapiTest - private HapiSpec autoRenewAccountIdNeedsAdminKeyToo() { + final HapiSpec autoRenewAccountIdNeedsAdminKeyToo() { return defaultHapiSpec("autoRenewAccountIdNeedsAdminKeyToo") .given(cryptoCreate("payer"), cryptoCreate("autoRenewAccount")) .when() @@ -118,7 +118,7 @@ private HapiSpec autoRenewAccountIdNeedsAdminKeyToo() { } @HapiTest - private HapiSpec autoRenewPeriodIsValidated() { + final HapiSpec autoRenewPeriodIsValidated() { final var tooShortAutoRenewPeriod = "tooShortAutoRenewPeriod"; final var tooLongAutoRenewPeriod = "tooLongAutoRenewPeriod"; return defaultHapiSpec("autoRenewPeriodIsValidated") @@ -134,7 +134,7 @@ private HapiSpec autoRenewPeriodIsValidated() { } @HapiTest - private HapiSpec noAutoRenewPeriod() { + final HapiSpec noAutoRenewPeriod() { return defaultHapiSpec("noAutoRenewPeriod") .given() .when() @@ -145,7 +145,7 @@ private HapiSpec noAutoRenewPeriod() { } @HapiTest - private HapiSpec signingRequirementsEnforced() { + final HapiSpec signingRequirementsEnforced() { long PAYER_BALANCE = 1_999_999_999L; final var contractWithAdminKey = "nonCryptoAccount"; @@ -219,7 +219,7 @@ private HapiSpec signingRequirementsEnforced() { } @HapiTest - private HapiSpec allFieldsSetHappyCase() { + final HapiSpec allFieldsSetHappyCase() { return defaultHapiSpec("AllFieldsSetHappyCase", NONDETERMINISTIC_TRANSACTION_FEES) .given(newKeyNamed("adminKey"), newKeyNamed("submitKey"), cryptoCreate("autoRenewAccount")) .when() @@ -231,7 +231,7 @@ private HapiSpec allFieldsSetHappyCase() { } @HapiTest - private HapiSpec feeAsExpected() { + final HapiSpec feeAsExpected() { return defaultHapiSpec("feeAsExpected") .given( newKeyNamed("adminKey"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicDeleteSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicDeleteSuite.java index cdaccb72d7e0..9d6e91dea050 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicDeleteSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicDeleteSuite.java @@ -63,7 +63,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec cannotDeleteAccountAsTopic() { + final HapiSpec cannotDeleteAccountAsTopic() { return defaultHapiSpec("CannotDeleteAccountAsTopic") .given(cryptoCreate("nonTopicId")) .when() @@ -72,7 +72,7 @@ private HapiSpec cannotDeleteAccountAsTopic() { } @HapiTest - private HapiSpec topicIdIsValidated() { + final HapiSpec topicIdIsValidated() { return defaultHapiSpec("topicIdIsValidated", FULLY_NONDETERMINISTIC) .given() .when() @@ -83,7 +83,7 @@ private HapiSpec topicIdIsValidated() { } @HapiTest - private HapiSpec noAdminKeyCannotDelete() { + final HapiSpec noAdminKeyCannotDelete() { return defaultHapiSpec("noAdminKeyCannotDelete") .given(createTopic("testTopic")) .when(deleteTopic("testTopic").hasKnownStatus(UNAUTHORIZED)) @@ -91,7 +91,7 @@ private HapiSpec noAdminKeyCannotDelete() { } @HapiTest - private HapiSpec deleteWithAdminKey() { + final HapiSpec deleteWithAdminKey() { return defaultHapiSpec("deleteWithAdminKey") .given(newKeyNamed("adminKey"), createTopic("testTopic").adminKeyName("adminKey")) .when(deleteTopic("testTopic").hasPrecheck(ResponseCodeEnum.OK)) @@ -99,7 +99,7 @@ private HapiSpec deleteWithAdminKey() { } @HapiTest - private HapiSpec deleteFailedWithWrongKey() { + final HapiSpec deleteFailedWithWrongKey() { long PAYER_BALANCE = 1_999_999_999L; return defaultHapiSpec("deleteFailedWithWrongKey") .given( @@ -115,7 +115,7 @@ private HapiSpec deleteFailedWithWrongKey() { } @HapiTest - private HapiSpec feeAsExpected() { + final HapiSpec feeAsExpected() { return defaultHapiSpec("feeAsExpected") .given(cryptoCreate("payer"), createTopic("testTopic").adminKeyName("payer")) .when(deleteTopic("testTopic").blankMemo().payingWith("payer").via("topicDelete")) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicGetInfoSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicGetInfoSuite.java index ba406d403753..b90a4a5f3931 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicGetInfoSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicGetInfoSuite.java @@ -61,7 +61,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec allFieldsSetHappyCase() { + final HapiSpec allFieldsSetHappyCase() { // sequenceNumber should be 0 and runningHash should be 48 bytes all 0s. final AtomicReference targetLedgerId = new AtomicReference<>(); return defaultHapiSpec("AllFieldsSetHappyCase") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicUpdateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicUpdateSuite.java index fc007ad85209..d38e66b39cb9 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicUpdateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/consensus/TopicUpdateSuite.java @@ -86,7 +86,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec updateToMissingTopicFails() { + final HapiSpec updateToMissingTopicFails() { return defaultHapiSpec("updateToMissingTopicFails") .given() .when() @@ -94,7 +94,7 @@ private HapiSpec updateToMissingTopicFails() { } @HapiTest - private HapiSpec validateMultipleFields() { + final HapiSpec validateMultipleFields() { byte[] longBytes = new byte[1000]; Arrays.fill(longBytes, (byte) 33); String longMemo = new String(longBytes, StandardCharsets.UTF_8); @@ -116,7 +116,7 @@ private HapiSpec validateMultipleFields() { } @HapiTest - private HapiSpec topicUpdateSigReqsEnforcedAtConsensus() { + final HapiSpec topicUpdateSigReqsEnforcedAtConsensus() { long PAYER_BALANCE = 199_999_999_999L; Function updateTopicSignedBy = (signers) -> updateTopic("testTopic") .payingWith("payer") @@ -155,7 +155,7 @@ private HapiSpec topicUpdateSigReqsEnforcedAtConsensus() { } @HapiTest - private HapiSpec updateSubmitKeyToDiffKey() { + final HapiSpec updateSubmitKeyToDiffKey() { return defaultHapiSpec("updateSubmitKeyToDiffKey") .given( newKeyNamed("adminKey"), @@ -169,7 +169,7 @@ private HapiSpec updateSubmitKeyToDiffKey() { } @HapiTest - private HapiSpec updateAdminKeyToDiffKey() { + final HapiSpec updateAdminKeyToDiffKey() { return defaultHapiSpec("updateAdminKeyToDiffKey") .given( newKeyNamed("adminKey"), @@ -180,7 +180,7 @@ private HapiSpec updateAdminKeyToDiffKey() { } @HapiTest - private HapiSpec updateAdminKeyToEmpty() { + final HapiSpec updateAdminKeyToEmpty() { return defaultHapiSpec("updateAdminKeyToEmpty") .given(newKeyNamed("adminKey"), createTopic("testTopic").adminKeyName("adminKey")) /* if adminKey is empty list should clear adminKey */ @@ -189,7 +189,7 @@ private HapiSpec updateAdminKeyToEmpty() { } @HapiTest - private HapiSpec updateMultipleFields() { + final HapiSpec updateMultipleFields() { long expirationTimestamp = Instant.now().getEpochSecond() + 10000000; // more than default.autorenew // .secs=7000000 return defaultHapiSpec("updateMultipleFields") @@ -223,7 +223,7 @@ private HapiSpec updateMultipleFields() { } @HapiTest - private HapiSpec expirationTimestampIsValidated() { + final HapiSpec expirationTimestampIsValidated() { long now = Instant.now().getEpochSecond(); return defaultHapiSpec("expirationTimestampIsValidated") .given(createTopic("testTopic").autoRenewPeriod(validAutoRenewPeriod)) @@ -239,7 +239,7 @@ private HapiSpec expirationTimestampIsValidated() { /* If admin key is not set, only expiration timestamp updates are allowed */ @HapiTest - private HapiSpec updateExpiryOnTopicWithNoAdminKey() { + final HapiSpec updateExpiryOnTopicWithNoAdminKey() { long overlyDistantNewExpiry = Instant.now().getEpochSecond() + defaultMaxLifetime + 12_345L; long reasonableNewExpiry = Instant.now().getEpochSecond() + defaultMaxLifetime - 12_345L; return defaultHapiSpec("updateExpiryOnTopicWithNoAdminKey") @@ -251,7 +251,7 @@ private HapiSpec updateExpiryOnTopicWithNoAdminKey() { } @HapiTest - private HapiSpec clearingAdminKeyWhenAutoRenewAccountPresent() { + final HapiSpec clearingAdminKeyWhenAutoRenewAccountPresent() { return defaultHapiSpec("clearingAdminKeyWhenAutoRenewAccountPresent") .given( newKeyNamed("adminKey"), @@ -264,7 +264,7 @@ private HapiSpec clearingAdminKeyWhenAutoRenewAccountPresent() { } @HapiTest - private HapiSpec updateSubmitKeyOnTopicWithNoAdminKeyFails() { + final HapiSpec updateSubmitKeyOnTopicWithNoAdminKeyFails() { return defaultHapiSpec("updateSubmitKeyOnTopicWithNoAdminKeyFails") .given(newKeyNamed("submitKey"), createTopic("testTopic")) .when(updateTopic("testTopic").submitKey("submitKey").hasKnownStatus(UNAUTHORIZED)) @@ -272,7 +272,7 @@ private HapiSpec updateSubmitKeyOnTopicWithNoAdminKeyFails() { } @HapiTest - private HapiSpec feeAsExpected() { + final HapiSpec feeAsExpected() { return defaultHapiSpec("feeAsExpected") .given( cryptoCreate("autoRenewAccount"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/classiccalls/FailureCharacterizationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/classiccalls/FailureCharacterizationSuite.java index dba0e67ea006..7f38d130d655 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/classiccalls/FailureCharacterizationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/classiccalls/FailureCharacterizationSuite.java @@ -178,7 +178,7 @@ enum CharacterizationMode { // assertions in production code, repeated string literals @SuppressWarnings({"java:S5960", "java:S1192"}) - private HapiSpec characterizeClassicFailureModes( + final HapiSpec characterizeClassicFailureModes( @NonNull final List calls, @NonNull final CharacterizationMode characterizationMode) { if (characterizationMode == CharacterizationMode.RECORD_SNAPSHOT) { CALL_RESULTS_SNAPSHOT.begin(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallLocalSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallLocalSuite.java index 890d553d6bb8..a0011ccc381c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallLocalSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallLocalSuite.java @@ -111,7 +111,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec htsOwnershipCheckWorksWithAliasAddress() { + final HapiSpec htsOwnershipCheckWorksWithAliasAddress() { final AtomicReference ecdsaAccountId = new AtomicReference<>(); final AtomicReference ecdsaAccountIdLongZeroAddress = new AtomicReference<>(); final AtomicReference ecdsaAccountIdAlias = new AtomicReference<>(); @@ -185,7 +185,7 @@ private HapiSpec htsOwnershipCheckWorksWithAliasAddress() { } @HapiTest - private HapiSpec vanillaSuccess() { + final HapiSpec vanillaSuccess() { return defaultHapiSpec("vanillaSuccess") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT).adminKey(THRESHOLD)) .when(contractCall(CONTRACT, "create").gas(785_000)) @@ -199,7 +199,7 @@ private HapiSpec vanillaSuccess() { } @HapiTest - private HapiSpec impureCallFails() { + final HapiSpec impureCallFails() { return defaultHapiSpec("impureCallFails") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT).adminKey(THRESHOLD)) .when() @@ -211,7 +211,7 @@ private HapiSpec impureCallFails() { } @HapiTest - private HapiSpec invalidDeletedContract() { + final HapiSpec invalidDeletedContract() { return defaultHapiSpec("invalidDeletedContract") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) .when(contractDelete(CONTRACT)) @@ -221,7 +221,7 @@ private HapiSpec invalidDeletedContract() { } @HapiTest - private HapiSpec invalidContractID() { + final HapiSpec invalidContractID() { final var invalidContract = HapiSpecSetup.getDefaultInstance().invalidContractName(); final var functionAbi = getABIFor(FUNCTION, "getIndirect", "CreateTrivial"); return defaultHapiSpec("InvalidContractID") @@ -237,7 +237,7 @@ private HapiSpec invalidContractID() { } @HapiTest - private HapiSpec insufficientFeeFails() { + final HapiSpec insufficientFeeFails() { final long adequateQueryPayment = 500_000L; return defaultHapiSpec("insufficientFeeFails") @@ -253,7 +253,7 @@ private HapiSpec insufficientFeeFails() { } @HapiTest - private HapiSpec lowBalanceFails() { + final HapiSpec lowBalanceFails() { final long adequateQueryPayment = 500_000_000L; return defaultHapiSpec("lowBalanceFails") @@ -276,7 +276,7 @@ private HapiSpec lowBalanceFails() { } @HapiTest - private HapiSpec erc20Query() { + final HapiSpec erc20Query() { final var decimalsABI = "{\"constant\": true,\"inputs\": [],\"name\": \"decimals\"," + "\"outputs\": [{\"name\": \"\",\"type\": \"uint8\"}],\"payable\": false," + "\"type\": \"function\"}"; @@ -290,7 +290,7 @@ private HapiSpec erc20Query() { // https://github.com/hashgraph/hedera-services/pull/5485 @HapiTest - private HapiSpec callLocalDoesNotCheckSignaturesNorPayer() { + final HapiSpec callLocalDoesNotCheckSignaturesNorPayer() { return defaultHapiSpec("callLocalDoesNotCheckSignaturesNorPayer") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT).adminKey(THRESHOLD)) .when(contractCall(CONTRACT, "create").gas(785_000)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallSuite.java index b27d2ddd4253..84cb262ff25d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallSuite.java @@ -257,7 +257,7 @@ public List getSpecsInSuite() { repeatedCreate2FailsWithInterpretableActionSidecars()); } - private HapiSpec repeatedCreate2FailsWithInterpretableActionSidecars() { + final HapiSpec repeatedCreate2FailsWithInterpretableActionSidecars() { final var contract = "Create2PrecompileUser"; final var salt = unhex(SALT); final var firstCreation = "firstCreation"; @@ -280,7 +280,7 @@ private HapiSpec repeatedCreate2FailsWithInterpretableActionSidecars() { .then(); } - private HapiSpec hollowCreationFailsCleanly() { + final HapiSpec hollowCreationFailsCleanly() { final var contract = "HollowAccountCreator"; return defaultHapiSpec("HollowCreationFailsCleanly") .given( @@ -296,7 +296,7 @@ private HapiSpec hollowCreationFailsCleanly() { } @HapiTest - private HapiSpec lowLevelEcrecCallBehavior() { + final HapiSpec lowLevelEcrecCallBehavior() { final var TEST_CONTRACT = "TestContract"; final var somebody = "somebody"; final var account = "0.0.1"; @@ -332,7 +332,7 @@ private HapiSpec lowLevelEcrecCallBehavior() { } @HapiTest - private HapiSpec callsToSystemEntityNumsAreTreatedAsPrecompileCalls() { + final HapiSpec callsToSystemEntityNumsAreTreatedAsPrecompileCalls() { final var TEST_CONTRACT = "TestContract"; final var ZERO_ADDRESS = 0L; final var zeroAddressTxn = "zeroAddressTxn"; @@ -546,7 +546,7 @@ private HapiSpec callsToSystemEntityNumsAreTreatedAsPrecompileCalls() { } @HapiTest - private HapiSpec depositMoreThanBalanceFailsGracefully() { + final HapiSpec depositMoreThanBalanceFailsGracefully() { return defaultHapiSpec("depositMoreThanBalanceFailsGracefully") .given( uploadInitCode(PAY_RECEIVABLE_CONTRACT), @@ -560,7 +560,7 @@ private HapiSpec depositMoreThanBalanceFailsGracefully() { } @HapiTest - private HapiSpec nestedContractCannotOverSendValue() { + final HapiSpec nestedContractCannotOverSendValue() { return defaultHapiSpec("NestedContractCannotOverSendValue") .given( cryptoCreate(ACCOUNT).balance(ONE_MILLION_HBARS), @@ -605,7 +605,7 @@ private HapiSpec nestedContractCannotOverSendValue() { } @HapiTest - private HapiSpec whitelistingAliasedContract() { + final HapiSpec whitelistingAliasedContract() { final var creationTxn = "creationTxn"; final var mirrorWhitelistCheckTxn = "mirrorWhitelistCheckTxn"; final var evmWhitelistCheckTxn = "evmWhitelistCheckTxn"; @@ -659,7 +659,7 @@ private HapiSpec whitelistingAliasedContract() { } @HapiTest - private HapiSpec cannotUseMirrorAddressOfAliasedContractInPrecompileMethod() { + final HapiSpec cannotUseMirrorAddressOfAliasedContractInPrecompileMethod() { final var creationTxn = "creationTxn"; final var ASSOCIATOR = "Associator"; @@ -714,7 +714,7 @@ private HapiSpec cannotUseMirrorAddressOfAliasedContractInPrecompileMethod() { @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec bitcarbonTestStillPasses() { + final HapiSpec bitcarbonTestStillPasses() { final var addressBook = "AddressBook"; final var jurisdictions = "Jurisdictions"; final var minters = "Minters"; @@ -797,7 +797,7 @@ private HapiSpec bitcarbonTestStillPasses() { } @HapiTest - private HapiSpec exchangeRatePrecompileWorks() { + final HapiSpec exchangeRatePrecompileWorks() { final var valueToTinycentCall = "recoverUsd"; final var rateAware = "ExchangeRatePrecompile"; // Must send $6.66 USD to access the gated method @@ -851,7 +851,7 @@ private HapiSpec exchangeRatePrecompileWorks() { */ @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec erc721TokenUriAndHtsNftInfoTreatNonUtf8BytesDifferently() { + final HapiSpec erc721TokenUriAndHtsNftInfoTreatNonUtf8BytesDifferently() { final var contractAlternatives = "ErcAndHtsAlternatives"; final AtomicReference

nftAddr = new AtomicReference<>(); final var viaErc721TokenURI = "erc721TokenURI"; @@ -911,7 +911,7 @@ private HapiSpec erc721TokenUriAndHtsNftInfoTreatNonUtf8BytesDifferently() { } @HapiTest - private HapiSpec imapUserExercise() { + final HapiSpec imapUserExercise() { final var contract = "User"; final var insert1To4 = "insert1To10"; final var insert2To8 = "insert2To8"; @@ -1399,7 +1399,7 @@ inlineTestContract, GET_CODE_SIZE, asHeadlongAddress(acctAddress)) } @HapiTest - private HapiSpec multipleSelfDestructsAreSafe() { + final HapiSpec multipleSelfDestructsAreSafe() { final var contract = "Fuse"; return defaultHapiSpec("MultipleSelfDestructsAreSafe", NONDETERMINISTIC_TRANSACTION_FEES) .given(uploadInitCode(contract), contractCreate(contract).gas(600_000)) @@ -1731,7 +1731,7 @@ HapiSpec payTestSelfDestructCall() { } @HapiTest - private HapiSpec contractTransferToSigReqAccountWithoutKeyFails() { + final HapiSpec contractTransferToSigReqAccountWithoutKeyFails() { return defaultHapiSpec("ContractTransferToSigReqAccountWithoutKeyFails") .given( cryptoCreate(RECEIVABLE_SIG_REQ_ACCOUNT) @@ -1756,7 +1756,7 @@ private HapiSpec contractTransferToSigReqAccountWithoutKeyFails() { } @HapiTest - private HapiSpec minChargeIsTXGasUsedByContractCall() { + final HapiSpec minChargeIsTXGasUsedByContractCall() { return defaultHapiSpec("MinChargeIsTXGasUsedByContractCall") .given(uploadInitCode(SIMPLE_UPDATE_CONTRACT)) .when( @@ -1777,7 +1777,7 @@ private HapiSpec minChargeIsTXGasUsedByContractCall() { } @HapiTest - private HapiSpec hscsEvm006ContractHBarTransferToAccount() { + final HapiSpec hscsEvm006ContractHBarTransferToAccount() { return defaultHapiSpec("hscsEvm006ContractHBarTransferToAccount") .given( cryptoCreate(ACCOUNT).balance(ONE_HUNDRED_HBARS), @@ -1803,7 +1803,7 @@ private HapiSpec hscsEvm006ContractHBarTransferToAccount() { } @HapiTest - private HapiSpec hscsEvm005TransfersWithSubLevelCallsBetweenContracts() { + final HapiSpec hscsEvm005TransfersWithSubLevelCallsBetweenContracts() { final var topLevelContract = "TopLevelTransferring"; final var subLevelContract = "SubLevelTransferring"; final var INITIAL_CONTRACT_BALANCE = 100; @@ -1861,7 +1861,7 @@ private HapiSpec hscsEvm005TransfersWithSubLevelCallsBetweenContracts() { } @HapiTest - private HapiSpec hscsEvm005TransferOfHBarsWorksBetweenContracts() { + final HapiSpec hscsEvm005TransferOfHBarsWorksBetweenContracts() { final var to = "To"; return defaultHapiSpec("hscsEvm005TransferOfHBarsWorksBetweenContracts") @@ -1894,7 +1894,7 @@ private HapiSpec hscsEvm005TransferOfHBarsWorksBetweenContracts() { } @HapiTest - private HapiSpec hscsEvm010ReceiverMustSignContractTx() { + final HapiSpec hscsEvm010ReceiverMustSignContractTx() { final var ACC = "acc"; final var RECEIVER_KEY = "receiverKey"; return defaultHapiSpec("hscsEvm010ReceiverMustSignContractTx") @@ -1931,7 +1931,7 @@ private HapiSpec hscsEvm010ReceiverMustSignContractTx() { } @HapiTest - private HapiSpec hscsEvm010MultiSignatureAccounts() { + final HapiSpec hscsEvm010MultiSignatureAccounts() { final var ACC = "acc"; final var PAYER_KEY = "pkey"; final var OTHER_KEY = "okey"; @@ -1985,7 +1985,7 @@ private HapiSpec hscsEvm010MultiSignatureAccounts() { } @HapiTest - private HapiSpec sendHbarsToAddressesMultipleTimes() { + final HapiSpec sendHbarsToAddressesMultipleTimes() { return defaultHapiSpec("sendHbarsToAddressesMultipleTimes") .given( cryptoCreate(ACCOUNT).balance(ONE_HUNDRED_HBARS), @@ -2013,7 +2013,7 @@ private HapiSpec sendHbarsToAddressesMultipleTimes() { } @HapiTest - private HapiSpec sendHbarsToDifferentAddresses() { + final HapiSpec sendHbarsToDifferentAddresses() { return defaultHapiSpec("sendHbarsToDifferentAddresses") .given( cryptoCreate(ACCOUNT).balance(ONE_HUNDRED_HBARS), @@ -2053,7 +2053,7 @@ private HapiSpec sendHbarsToDifferentAddresses() { } @HapiTest - private HapiSpec sendHbarsFromDifferentAddressessToAddress() { + final HapiSpec sendHbarsFromDifferentAddressessToAddress() { return defaultHapiSpec("sendHbarsFromDifferentAddressessToAddress") .given( cryptoCreate(ACCOUNT).balance(ONE_HUNDRED_HBARS), @@ -2097,7 +2097,7 @@ private HapiSpec sendHbarsFromDifferentAddressessToAddress() { } @HapiTest - private HapiSpec sendHbarsToOuterContractFromDifferentAddresses() { + final HapiSpec sendHbarsToOuterContractFromDifferentAddresses() { return defaultHapiSpec("sendHbarsToOuterContractFromDifferentAddresses") .given( cryptoCreate(ACCOUNT).balance(ONE_HUNDRED_HBARS), @@ -2134,7 +2134,7 @@ private HapiSpec sendHbarsToOuterContractFromDifferentAddresses() { } @HapiTest - private HapiSpec sendHbarsToCallerFromDifferentAddresses() { + final HapiSpec sendHbarsToCallerFromDifferentAddresses() { return defaultHapiSpec("sendHbarsToCallerFromDifferentAddresses") .given(withOpContext((spec, log) -> { final var keyCreation = newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE); @@ -2221,7 +2221,7 @@ private HapiSpec sendHbarsToCallerFromDifferentAddresses() { } @HapiTest - private HapiSpec sendHbarsFromAndToDifferentAddressess() { + final HapiSpec sendHbarsFromAndToDifferentAddressess() { return defaultHapiSpec("sendHbarsFromAndToDifferentAddressess") .given( cryptoCreate(ACCOUNT).balance(200 * ONE_HUNDRED_HBARS), @@ -2278,7 +2278,7 @@ private HapiSpec sendHbarsFromAndToDifferentAddressess() { } @HapiTest - private HapiSpec transferNegativeAmountOfHbarsFails() { + final HapiSpec transferNegativeAmountOfHbarsFails() { return defaultHapiSpec("transferNegativeAmountOfHbarsFails") .given( cryptoCreate(ACCOUNT).balance(ONE_HUNDRED_HBARS), @@ -2312,7 +2312,7 @@ private HapiSpec transferNegativeAmountOfHbarsFails() { } @HapiTest - private HapiSpec transferZeroHbars() { + final HapiSpec transferZeroHbars() { return defaultHapiSpec("transferZeroHbars") .given( cryptoCreate(ACCOUNT).balance(ONE_HUNDRED_HBARS), @@ -2350,7 +2350,7 @@ private HapiSpec transferZeroHbars() { } @HapiTest - private HapiSpec consTimeManagementWorksWithRevertedInternalCreations() { + final HapiSpec consTimeManagementWorksWithRevertedInternalCreations() { final var contract = "ConsTimeRepro"; final var failingCall = "FailingCall"; final AtomicReference parentConsTime = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallV1SecurityModelSuite.java index df5a638709ea..ac91c2aefa9d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCallV1SecurityModelSuite.java @@ -99,7 +99,7 @@ public List getSpecsInSuite() { lpFarmSimulation()); } - private HapiSpec workingHoursDemo() { + final HapiSpec workingHoursDemo() { final var gasToOffer = 4_000_000; final var contract = "WorkingHours"; final var ticketToken = "ticketToken"; @@ -184,7 +184,7 @@ private HapiSpec workingHoursDemo() { getTxnRecord(ticketWorking).andAllChildRecords().logged()); } - private HapiSpec canMintAndTransferInSameContractOperation() { + final HapiSpec canMintAndTransferInSameContractOperation() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); final var nfToken = "nfToken"; @@ -251,7 +251,7 @@ private HapiSpec canMintAndTransferInSameContractOperation() { .alsoSigningWithFullPrefix(multiKey, aCivilian))); } - private HapiSpec contractTransferToSigReqAccountWithKeySucceeds() { + final HapiSpec contractTransferToSigReqAccountWithKeySucceeds() { return propertyPreservingHapiSpec("ContractTransferToSigReqAccountWithKeySucceeds") .preserving(CONTRACTS_ALLOW_SYSTEM_USE_OF_HAPI_SIGS, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( @@ -301,7 +301,7 @@ private HapiSpec contractTransferToSigReqAccountWithKeySucceeds() { })); } - private HapiSpec lpFarmSimulation() { + final HapiSpec lpFarmSimulation() { final var adminKey = "adminKey"; final var gasToOffer = 4_000_000; final var farmInitcodeLoc = "src/main/resource/contract/bytecodes/farmInitcode.bin"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCreateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCreateSuite.java index 9eec51017e62..8ae9446d7594 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCreateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCreateSuite.java @@ -216,7 +216,7 @@ HapiSpec createContractWithStakingFields() { } @HapiTest - private HapiSpec insufficientPayerBalanceUponCreation() { + final HapiSpec insufficientPayerBalanceUponCreation() { return defaultHapiSpec("InsufficientPayerBalanceUponCreation") .given(cryptoCreate("bankrupt").balance(0L), uploadInitCode(EMPTY_CONSTRUCTOR_CONTRACT)) .when() @@ -273,7 +273,7 @@ HapiSpec invalidSystemInitcodeFileFailsWithInvalidFileId() { } @HapiTest - private HapiSpec createsVanillaContractAsExpectedWithOmittedAdminKey() { + final HapiSpec createsVanillaContractAsExpectedWithOmittedAdminKey() { return defaultHapiSpec("createsVanillaContractAsExpectedWithOmittedAdminKey") .given(uploadInitCode(EMPTY_CONSTRUCTOR_CONTRACT)) .when() @@ -285,7 +285,7 @@ private HapiSpec createsVanillaContractAsExpectedWithOmittedAdminKey() { } @HapiTest - private HapiSpec childCreationsHaveExpectedKeysWithOmittedAdminKey() { + final HapiSpec childCreationsHaveExpectedKeysWithOmittedAdminKey() { final AtomicLong firstStickId = new AtomicLong(); final AtomicLong secondStickId = new AtomicLong(); final AtomicLong thirdStickId = new AtomicLong(); @@ -327,7 +327,7 @@ final var record = op.getResponseRecord(); } @HapiTest - private HapiSpec createEmptyConstructor() { + final HapiSpec createEmptyConstructor() { return defaultHapiSpec("createEmptyConstructor") .given(uploadInitCode(EMPTY_CONSTRUCTOR_CONTRACT)) .when() @@ -335,7 +335,7 @@ private HapiSpec createEmptyConstructor() { } @HapiTest - private HapiSpec revertedTryExtCallHasNoSideEffects() { + final HapiSpec revertedTryExtCallHasNoSideEffects() { final var balance = 3_000; final int sendAmount = balance / 3; final var contract = "RevertingSendTry"; @@ -368,7 +368,7 @@ private HapiSpec revertedTryExtCallHasNoSideEffects() { } @HapiTest - private HapiSpec createFailsIfMissingSigs() { + final HapiSpec createFailsIfMissingSigs() { final var shape = listOf(SIMPLE, threshOf(2, 3), threshOf(1, 3)); final var validSig = shape.signedWith(sigs(ON, sigs(ON, ON, OFF), sigs(OFF, OFF, ON))); final var invalidSig = shape.signedWith(sigs(OFF, sigs(ON, ON, OFF), sigs(OFF, OFF, ON))); @@ -388,7 +388,7 @@ private HapiSpec createFailsIfMissingSigs() { } @HapiTest - private HapiSpec rejectsInsufficientGas() { + final HapiSpec rejectsInsufficientGas() { return defaultHapiSpec("RejectsInsufficientGas") .given(uploadInitCode(EMPTY_CONSTRUCTOR_CONTRACT)) .when() @@ -396,7 +396,7 @@ private HapiSpec rejectsInsufficientGas() { } @HapiTest - private HapiSpec rejectsInvalidMemo() { + final HapiSpec rejectsInvalidMemo() { return defaultHapiSpec("RejectsInvalidMemo") .given() .when() @@ -411,7 +411,7 @@ private HapiSpec rejectsInvalidMemo() { } @HapiTest - private HapiSpec rejectsInsufficientFee() { + final HapiSpec rejectsInsufficientFee() { return defaultHapiSpec("RejectsInsufficientFee") .given(cryptoCreate(PAYER), uploadInitCode(EMPTY_CONSTRUCTOR_CONTRACT)) .when() @@ -422,7 +422,7 @@ private HapiSpec rejectsInsufficientFee() { } @HapiTest - private HapiSpec rejectsInvalidBytecode() { + final HapiSpec rejectsInvalidBytecode() { final var contract = "InvalidBytecode"; return defaultHapiSpec("RejectsInvalidBytecode") .given(uploadInitCode(contract)) @@ -431,7 +431,7 @@ private HapiSpec rejectsInvalidBytecode() { } @HapiTest - private HapiSpec revertsNonzeroBalance() { + final HapiSpec revertsNonzeroBalance() { return defaultHapiSpec("RevertsNonzeroBalance") .given(uploadInitCode(EMPTY_CONSTRUCTOR_CONTRACT)) .when() @@ -439,7 +439,7 @@ private HapiSpec revertsNonzeroBalance() { } @HapiTest - private HapiSpec delegateContractIdRequiredForTransferInDelegateCall() { + final HapiSpec delegateContractIdRequiredForTransferInDelegateCall() { final var justSendContract = "JustSend"; final var sendInternalAndDelegateContract = "SendInternalAndDelegate"; @@ -489,7 +489,7 @@ private HapiSpec delegateContractIdRequiredForTransferInDelegateCall() { } @HapiTest - private HapiSpec cannotCreateTooLargeContract() { + final HapiSpec cannotCreateTooLargeContract() { ByteString contents; try { contents = ByteString.copyFrom(Files.readAllBytes(Path.of(bytecodePath("CryptoKitties")))); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCreateV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCreateV1SecurityModelSuite.java index 2d42b48532ef..70390df8e444 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCreateV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractCreateV1SecurityModelSuite.java @@ -58,7 +58,7 @@ public boolean canRunConcurrent() { return false; } - private HapiSpec receiverSigReqTransferRecipientMustSignWithFullPubKeyPrefix() { + final HapiSpec receiverSigReqTransferRecipientMustSignWithFullPubKeyPrefix() { final var sendInternalAndDelegateContract = "SendInternalAndDelegate"; final var justSendContract = "JustSend"; final var beneficiary = "civilian"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractDeleteSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractDeleteSuite.java index 92f2bdb2b264..da42ff2a14cc 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractDeleteSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractDeleteSuite.java @@ -112,7 +112,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec cannotUseMoreThanChildContractLimit() { + final HapiSpec cannotUseMoreThanChildContractLimit() { final var illegalNumChildren = HapiSpecSetup.getDefaultNodeProps().getInteger("consensus.handle.maxFollowingRecords") + 1; final var fungible = "fungible"; @@ -161,7 +161,7 @@ private HapiSpec cannotUseMoreThanChildContractLimit() { } @HapiTest - private HapiSpec cannotSendValueToTokenAccount() { + final HapiSpec cannotSendValueToTokenAccount() { final var multiKey = "multiKey"; final var nonFungibleToken = "NFT"; final var contract = "ManyChildren"; @@ -279,7 +279,7 @@ HapiSpec rejectsWithoutProperSig() { } @HapiTest - private HapiSpec systemCannotDeleteOrUndeleteContracts() { + final HapiSpec systemCannotDeleteOrUndeleteContracts() { return defaultHapiSpec("SystemCannotDeleteOrUndeleteContracts") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) .when() @@ -294,7 +294,7 @@ private HapiSpec systemCannotDeleteOrUndeleteContracts() { } @HapiTest - private HapiSpec deleteWorksWithMutableContract() { + final HapiSpec deleteWorksWithMutableContract() { final var tbdFile = "FTBD"; final var tbdContract = "CTBD"; return defaultHapiSpec("DeleteWorksWithMutableContract") @@ -312,7 +312,7 @@ private HapiSpec deleteWorksWithMutableContract() { } @HapiTest - private HapiSpec deleteFailsWithImmutableContract() { + final HapiSpec deleteFailsWithImmutableContract() { return defaultHapiSpec("DeleteFailsWithImmutableContract") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT).omitAdminKey()) .when() @@ -320,7 +320,7 @@ private HapiSpec deleteFailsWithImmutableContract() { } @HapiTest - private HapiSpec deleteTransfersToAccount() { + final HapiSpec deleteTransfersToAccount() { return defaultHapiSpec("DeleteTransfersToAccount") .given( cryptoCreate(RECEIVER_CONTRACT_NAME).balance(0L), @@ -331,7 +331,7 @@ private HapiSpec deleteTransfersToAccount() { } @HapiTest - private HapiSpec deleteTransfersToContract() { + final HapiSpec deleteTransfersToContract() { final var suffix = "Receiver"; return defaultHapiSpec("DeleteTransfersToContract") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractGetBytecodeSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractGetBytecodeSuite.java index 5d8accf400e3..55350ec2a2f8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractGetBytecodeSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractGetBytecodeSuite.java @@ -69,7 +69,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec getByteCodeWorks() { + final HapiSpec getByteCodeWorks() { final var contract = "EmptyConstructor"; return HapiSpec.defaultHapiSpec("GetByteCodeWorks") .given(uploadInitCode(contract), contractCreate(contract)) @@ -89,7 +89,7 @@ private HapiSpec getByteCodeWorks() { } @HapiTest - private HapiSpec invalidContractFromCostAnswer() { + final HapiSpec invalidContractFromCostAnswer() { return defaultHapiSpec("InvalidContractFromCostAnswer") .given() .when() @@ -98,7 +98,7 @@ private HapiSpec invalidContractFromCostAnswer() { } @HapiTest - private HapiSpec invalidContractFromAnswerOnly() { + final HapiSpec invalidContractFromAnswerOnly() { return defaultHapiSpec("InvalidContractFromAnswerOnly") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractGetInfoSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractGetInfoSuite.java index 21129722e2a1..ab9ed8add2c0 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractGetInfoSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractGetInfoSuite.java @@ -60,7 +60,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec getInfoWorks() { + final HapiSpec getInfoWorks() { final var contract = "Multipurpose"; final var MEMO = "This is a test."; return defaultHapiSpec("GetInfoWorks") @@ -79,7 +79,7 @@ private HapiSpec getInfoWorks() { } @HapiTest - private HapiSpec invalidContractFromCostAnswer() { + final HapiSpec invalidContractFromCostAnswer() { return defaultHapiSpec("InvalidContractFromCostAnswer") .given() .when() @@ -88,7 +88,7 @@ private HapiSpec invalidContractFromCostAnswer() { } @HapiTest - private HapiSpec invalidContractFromAnswerOnly() { + final HapiSpec invalidContractFromAnswerOnly() { return defaultHapiSpec("InvalidContractFromAnswerOnly") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractMusicalChairsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractMusicalChairsSuite.java index bcd7c1127f8e..f2a685e24936 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractMusicalChairsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractMusicalChairsSuite.java @@ -66,7 +66,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec playGame() { + final HapiSpec playGame() { final var dj = "dj"; final var players = IntStream.range(1, 30).mapToObj(i -> "Player" + i).toList(); final var contract = "MusicalChairs"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractUpdateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractUpdateSuite.java index d0f27e30e5a3..fe36cf1dd80d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractUpdateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/hapi/ContractUpdateSuite.java @@ -106,7 +106,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec updateStakingFieldsWorks() { + final HapiSpec updateStakingFieldsWorks() { return defaultHapiSpec("updateStakingFieldsWorks") .given( uploadInitCode(CONTRACT), @@ -155,7 +155,7 @@ private HapiSpec updateStakingFieldsWorks() { // https://github.com/hashgraph/hedera-services/issues/2877 @HapiTest - private HapiSpec eip1014AddressAlwaysHasPriority() { + final HapiSpec eip1014AddressAlwaysHasPriority() { final var contract = "VariousCreate2Calls"; final var creationTxn = "creationTxn"; final var callTxn = "callTxn"; @@ -213,7 +213,7 @@ private HapiSpec eip1014AddressAlwaysHasPriority() { } @HapiTest - private HapiSpec updateWithBothMemoSettersWorks() { + final HapiSpec updateWithBothMemoSettersWorks() { final var firstMemo = "First"; final var secondMemo = "Second"; final var thirdMemo = "Third"; @@ -233,7 +233,7 @@ private HapiSpec updateWithBothMemoSettersWorks() { } @HapiTest - private HapiSpec updatingExpiryWorks() { + final HapiSpec updatingExpiryWorks() { final var newExpiry = Instant.now().getEpochSecond() + 5 * ONE_MONTH; return defaultHapiSpec("UpdatingExpiryWorks") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) @@ -242,7 +242,7 @@ private HapiSpec updatingExpiryWorks() { } @HapiTest - private HapiSpec rejectsExpiryTooFarInTheFuture() { + final HapiSpec rejectsExpiryTooFarInTheFuture() { final var smallBuffer = 12_345L; final var excessiveExpiry = defaultMaxLifetime + Instant.now().getEpochSecond() + smallBuffer; @@ -253,7 +253,7 @@ private HapiSpec rejectsExpiryTooFarInTheFuture() { } @HapiTest - private HapiSpec updateAutoRenewWorks() { + final HapiSpec updateAutoRenewWorks() { return defaultHapiSpec("UpdateAutoRenewWorks") .given( newKeyNamed(ADMIN_KEY), @@ -264,7 +264,7 @@ private HapiSpec updateAutoRenewWorks() { } @HapiTest - private HapiSpec updateAutoRenewAccountWorks() { + final HapiSpec updateAutoRenewAccountWorks() { final var autoRenewAccount = "autoRenewAccount"; final var newAutoRenewAccount = "newAutoRenewAccount"; return defaultHapiSpec("UpdateAutoRenewAccountWorks") @@ -291,7 +291,7 @@ private HapiSpec updateAutoRenewAccountWorks() { } @HapiTest - private HapiSpec updateAdminKeyWorks() { + final HapiSpec updateAdminKeyWorks() { return defaultHapiSpec("UpdateAdminKeyWorks") .given( newKeyNamed(ADMIN_KEY), @@ -307,7 +307,7 @@ private HapiSpec updateAdminKeyWorks() { // https://github.com/hashgraph/hedera-services/issues/3037 @HapiTest - private HapiSpec immutableContractKeyFormIsStandard() { + final HapiSpec immutableContractKeyFormIsStandard() { return defaultHapiSpec("ImmutableContractKeyFormIsStandard") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT).immutable()) .when() @@ -315,7 +315,7 @@ private HapiSpec immutableContractKeyFormIsStandard() { } @HapiTest - private HapiSpec canMakeContractImmutableWithEmptyKeyList() { + final HapiSpec canMakeContractImmutableWithEmptyKeyList() { return defaultHapiSpec("CanMakeContractImmutableWithEmptyKeyList") .given( newKeyNamed(ADMIN_KEY), @@ -329,7 +329,7 @@ private HapiSpec canMakeContractImmutableWithEmptyKeyList() { } @HapiTest - private HapiSpec givenAdminKeyMustBeValid() { + final HapiSpec givenAdminKeyMustBeValid() { final var contract = "BalanceLookup"; return defaultHapiSpec("GivenAdminKeyMustBeValid") .given(uploadInitCode(contract), contractCreate(contract)) @@ -434,7 +434,7 @@ HapiSpec fridayThe13thSpec() { } @HapiTest - private HapiSpec updateDoesNotChangeBytecode() { + final HapiSpec updateDoesNotChangeBytecode() { // HSCS-DCPR-001 final var simpleStorageContract = "SimpleStorage"; final var emptyConstructorContract = "EmptyConstructor"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java index 98b6ba1af9c9..9f3a8b81ef15 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationSuite.java @@ -196,7 +196,7 @@ public List getSpecsInSuite() { @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec allLogOpcodesResolveExpectedContractId() { + final HapiSpec allLogOpcodesResolveExpectedContractId() { final var contract = "OuterCreator"; final AtomicLong outerCreatorNum = new AtomicLong(); @@ -230,7 +230,7 @@ private HapiSpec allLogOpcodesResolveExpectedContractId() { // https://github.com/hashgraph/hedera-services/issues/2868 @HapiTest - private HapiSpec inlineCreate2CanFailSafely() { + final HapiSpec inlineCreate2CanFailSafely() { final var tcValue = 1_234L; final var contract = "RevertingCreateFactory"; final var foo = BigInteger.valueOf(22); @@ -277,7 +277,7 @@ private HapiSpec inlineCreate2CanFailSafely() { @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec inlineCreateCanFailSafely() { + final HapiSpec inlineCreateCanFailSafely() { final var tcValue = 1_234L; final var creation = CREATION; final var contract = "RevertingCreateFactory"; @@ -324,7 +324,7 @@ private HapiSpec inlineCreateCanFailSafely() { } @HapiTest - private HapiSpec canAssociateInConstructor() { + final HapiSpec canAssociateInConstructor() { final var token = "token"; final var contract = "SelfAssociating"; final AtomicReference tokenMirrorAddr = new AtomicReference<>(); @@ -346,7 +346,7 @@ private HapiSpec canAssociateInConstructor() { } @HapiTest - private HapiSpec payableCreate2WorksAsExpected() { + final HapiSpec payableCreate2WorksAsExpected() { final var contract = "PayableCreate2Deploy"; AtomicReference tcMirrorAddr2 = new AtomicReference<>(); AtomicReference tcAliasAddr2 = new AtomicReference<>(); @@ -371,7 +371,7 @@ private HapiSpec payableCreate2WorksAsExpected() { // https://github.com/hashgraph/hedera-services/issues/2868 @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec create2FactoryWorksAsExpected() { + final HapiSpec create2FactoryWorksAsExpected() { final var tcValue = 1_234L; final var contract = "Create2Factory"; final var testContract = "TestContract"; @@ -503,7 +503,7 @@ contract, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), salt) @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec canMergeCreate2ChildWithHollowAccount() { + final HapiSpec canMergeCreate2ChildWithHollowAccount() { final var tcValue = 1_234L; final var contract = "Create2Factory"; final var creation = CREATION; @@ -626,7 +626,7 @@ contract, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), salt) @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec canMergeCreate2MultipleCreatesWithHollowAccount() { + final HapiSpec canMergeCreate2MultipleCreatesWithHollowAccount() { final var tcValue = 1_234L; final var contract = "Create2MultipleCreates"; final var creation = CREATION; @@ -739,7 +739,7 @@ contract, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), salt) } @HapiTest - private HapiSpec canCallFinalizedContractViaHapi() { + final HapiSpec canCallFinalizedContractViaHapi() { final var contract = "FinalizedDestructible"; final var salt = BigInteger.valueOf(1_234_567_890L); final AtomicReference
childAddress = new AtomicReference<>(); @@ -775,7 +775,7 @@ private HapiSpec canCallFinalizedContractViaHapi() { @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec eip1014AliasIsPriorityInErcOwnerPrecompile() { + final HapiSpec eip1014AliasIsPriorityInErcOwnerPrecompile() { final var ercContract = "ERC721Contract"; final var pc2User = "Create2PrecompileUser"; final var nft = "nonFungibleToken"; @@ -838,7 +838,7 @@ private HapiSpec eip1014AliasIsPriorityInErcOwnerPrecompile() { @SuppressWarnings("java:S5669") // Missing creation record - private HapiSpec canUseAliasesInPrecompilesAndContractKeys() { + final HapiSpec canUseAliasesInPrecompilesAndContractKeys() { final var creation2 = CREATE_2_TXN; final var contract = "Create2PrecompileUser"; final var userContract = "Create2User"; @@ -1020,7 +1020,7 @@ private HapiSpec canUseAliasesInPrecompilesAndContractKeys() { // https://github.com/hashgraph/hedera-services/issues/2925 @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec cannotSelfDestructToMirrorAddress() { + final HapiSpec cannotSelfDestructToMirrorAddress() { final var creation2 = CREATE_2_TXN; final var messyCreation2 = "messyCreate2Txn"; final var contract = "CreateDonor"; @@ -1071,7 +1071,7 @@ private HapiSpec cannotSelfDestructToMirrorAddress() { // https://github.com/hashgraph/hedera-services/issues/2874 @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec canDeleteViaAlias() { + final HapiSpec canDeleteViaAlias() { final var adminKey = ADMIN_KEY; final var creation2 = CREATE_2_TXN; final var deletion = "deletion"; @@ -1145,7 +1145,7 @@ private HapiSpec canDeleteViaAlias() { @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec create2InputAddressIsStableWithTopLevelCallWhetherMirrorOrAliasIsUsed() { + final HapiSpec create2InputAddressIsStableWithTopLevelCallWhetherMirrorOrAliasIsUsed() { final var creation2 = CREATE_2_TXN; final var innerCreation2 = "innerCreate2Txn"; final var delegateCreation2 = "delegateCreate2Txn"; @@ -1219,7 +1219,7 @@ private HapiSpec create2InputAddressIsStableWithTopLevelCallWhetherMirrorOrAlias @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec priorityAddressIsCreate2ForStaticHapiCalls() { + final HapiSpec priorityAddressIsCreate2ForStaticHapiCalls() { final var contract = "AddressValueRet"; final AtomicReference aliasAddr = new AtomicReference<>(); @@ -1274,7 +1274,7 @@ private HapiSpec priorityAddressIsCreate2ForStaticHapiCalls() { @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec canInternallyCallAliasedAddressesOnlyViaCreate2Address() { + final HapiSpec canInternallyCallAliasedAddressesOnlyViaCreate2Address() { final var contract = "AddressValueRet"; final var aliasCall = "aliasCall"; final var mirrorCall = "mirrorCall"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationV1SecurityModelSuite.java index f9eb230bed58..7171a528187e 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/Create2OperationV1SecurityModelSuite.java @@ -64,7 +64,7 @@ public List getSpecsInSuite() { return List.of(childInheritanceOfAdminKeyAuthorizesParentAssociationInConstructor()); } - private HapiSpec childInheritanceOfAdminKeyAuthorizesParentAssociationInConstructor() { + final HapiSpec childInheritanceOfAdminKeyAuthorizesParentAssociationInConstructor() { final var ft = "fungibleToken"; final var multiKey = SWISS; final var creationAndAssociation = "creationAndAssociation"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/CreateOperationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/CreateOperationSuite.java index 7dd3119c0dcd..8b5cb03d54ba 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/CreateOperationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/CreateOperationSuite.java @@ -94,7 +94,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec factoryAndSelfDestructInConstructorContract() { + final HapiSpec factoryAndSelfDestructInConstructorContract() { final var contract = "FactorySelfDestructConstructor"; final var sender = "sender"; @@ -108,7 +108,7 @@ private HapiSpec factoryAndSelfDestructInConstructorContract() { } @HapiTest - private HapiSpec factoryQuickSelfDestructContract() { + final HapiSpec factoryQuickSelfDestructContract() { final var contract = "FactoryQuickSelfDestruct"; final var sender = "sender"; return defaultHapiSpec("FactoryQuickSelfDestructContract") @@ -133,7 +133,7 @@ private HapiSpec factoryQuickSelfDestructContract() { } @HapiTest - private HapiSpec inheritanceOfNestedCreatedContracts() { + final HapiSpec inheritanceOfNestedCreatedContracts() { final var contract = "NestedChildren"; return defaultHapiSpec("InheritanceOfNestedCreatedContracts") .given( @@ -287,7 +287,7 @@ HapiSpec resetOnStackedFactoryFailureWorks() { } @HapiTest - private HapiSpec contractCreateWithNewOpInConstructorAbandoningParent() { + final HapiSpec contractCreateWithNewOpInConstructorAbandoningParent() { final var contract = "AbandoningParent"; return defaultHapiSpec("contractCreateWithNewOpInConstructorAbandoningParent") .given(uploadInitCode(contract), contractCreate(contract).via("AbandoningParentTxn")) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/GlobalPropertiesSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/GlobalPropertiesSuite.java index 814adc46fff5..29be654e1313 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/GlobalPropertiesSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/GlobalPropertiesSuite.java @@ -75,7 +75,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec chainIdWorks() { + final HapiSpec chainIdWorks() { final var defaultChainId = BigInteger.valueOf(295L); final var devChainId = BigInteger.valueOf(298L); final Set acceptableChainIds = Set.of(devChainId, defaultChainId); @@ -99,7 +99,7 @@ private HapiSpec chainIdWorks() { } @HapiTest - private HapiSpec baseFeeWorks() { + final HapiSpec baseFeeWorks() { final var expectedBaseFee = BigInteger.valueOf(0); return defaultHapiSpec("baseFeeWorks") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) @@ -123,7 +123,7 @@ private HapiSpec baseFeeWorks() { @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec coinbaseWorks() { + final HapiSpec coinbaseWorks() { return defaultHapiSpec("coinbaseWorks") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) .when(contractCall(CONTRACT, "getCoinbase").via("coinbase")) @@ -146,7 +146,7 @@ private HapiSpec coinbaseWorks() { } @HapiTest - private HapiSpec gasLimitWorks() { + final HapiSpec gasLimitWorks() { final var gasLimit = Long.parseLong(HapiSpecSetup.getDefaultNodeProps().get("contracts.maxGasPerSec")); return defaultHapiSpec("gasLimitWorks") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/PrngSeedOperationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/PrngSeedOperationSuite.java index d76bcf0d9423..b43a0dc2906b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/PrngSeedOperationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/PrngSeedOperationSuite.java @@ -88,7 +88,7 @@ List positiveSpecs() { } @HapiTest - private HapiSpec multipleCallsHaveIndependentResults() { + final HapiSpec multipleCallsHaveIndependentResults() { final var prng = THE_PRNG_CONTRACT; final var gasToOffer = 400_000; final var numCalls = 5; @@ -137,7 +137,7 @@ private HapiSpec multipleCallsHaveIndependentResults() { } @HapiTest - private HapiSpec prngPrecompileHappyPathWorks() { + final HapiSpec prngPrecompileHappyPathWorks() { final var prng = THE_PRNG_CONTRACT; final var randomBits = "randomBits"; return defaultHapiSpec("prngPrecompileHappyPathWorks") @@ -161,7 +161,7 @@ GET_SEED, prng, isRandomResult((new Object[] {new byte[32]}))))) } @HapiTest - private HapiSpec prngPrecompileDisabledInV030() { + final HapiSpec prngPrecompileDisabledInV030() { final var prng = THE_PRNG_CONTRACT; final var randomBits = "randomBits"; return defaultHapiSpec("prngPrecompileDisabledInV_0_30") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/PushZeroOperationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/PushZeroOperationSuite.java index b3578cef1ccb..5eba21840990 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/PushZeroOperationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/PushZeroOperationSuite.java @@ -75,7 +75,7 @@ List positiveSpecs() { } @HapiTest - private HapiSpec pushZeroHappyPathWorks() { + final HapiSpec pushZeroHappyPathWorks() { final var pushZeroContract = CONTRACT; final var pushResult = "pushResult"; return defaultHapiSpec("prngPrecompileHappyPathWorks") @@ -101,7 +101,7 @@ private HapiSpec pushZeroHappyPathWorks() { } @HapiTest - private HapiSpec pushZeroDisabledInV034() { + final HapiSpec pushZeroDisabledInV034() { final var pushZeroContract = CONTRACT; final var pushResult = "pushResult"; return defaultHapiSpec("pushZeroDisabledInV034") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/SStoreSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/SStoreSuite.java index e47a653ff50a..ed11620628b4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/SStoreSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/SStoreSuite.java @@ -172,7 +172,7 @@ private HapiSpecOperation[] valuesMatch( @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec benchmarkSingleSetter() { + final HapiSpec benchmarkSingleSetter() { final var contract = "Benchmark"; final var GAS_LIMIT = 1_000_000; var value = Bytes.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000005") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/SelfDestructSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/SelfDestructSuite.java index 170980cab8b8..e0b8335531af 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/SelfDestructSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/opcodes/SelfDestructSuite.java @@ -76,7 +76,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec hscsEvm008SelfDestructInConstructorWorks() { + final HapiSpec hscsEvm008SelfDestructInConstructorWorks() { final var contract = "FactorySelfDestructConstructor"; final var nextAccount = "civilian"; return defaultHapiSpec("hscsEvm008SelfDestructInConstructorWorks") @@ -101,7 +101,7 @@ private HapiSpec hscsEvm008SelfDestructInConstructorWorks() { } @HapiTest - private HapiSpec hscsEvm008SelfDestructWhenCalling() { + final HapiSpec hscsEvm008SelfDestructWhenCalling() { return defaultHapiSpec("hscsEvm008SelfDestructWhenCalling") .given( cryptoCreate("acc").balance(5 * ONE_HUNDRED_HBARS), @@ -118,7 +118,7 @@ private HapiSpec hscsEvm008SelfDestructWhenCalling() { } @HapiTest - private HapiSpec selfDestructFailsWhenBeneficiaryHasReceiverSigRequiredAndHasNotSignedTheTxn() { + final HapiSpec selfDestructFailsWhenBeneficiaryHasReceiverSigRequiredAndHasNotSignedTheTxn() { final AtomicLong beneficiaryId = new AtomicLong(); return defaultHapiSpec("selfDestructFailsWhenBeneficiaryHasReceiverSigRequiredAndHasNotSignedTheTxn") .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC1155ContractInteractions.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC1155ContractInteractions.java index 690c8cbc87fc..401bb5099eec 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC1155ContractInteractions.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC1155ContractInteractions.java @@ -69,7 +69,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec erc1155() { + final HapiSpec erc1155() { return defaultHapiSpec("erc1155") .given( newKeyNamed("ec").shape(SECP_256K1_SHAPE), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC20ContractInteractions.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC20ContractInteractions.java index 92df07d897cb..56a67713c422 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC20ContractInteractions.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC20ContractInteractions.java @@ -80,7 +80,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec callsERC20ContractInteractions() { + final HapiSpec callsERC20ContractInteractions() { final var CONTRACT = "GLDToken"; final var CREATE_TX = "create"; final var APPROVE_TX = "approve"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC721ContractInteractions.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC721ContractInteractions.java index 109597e90548..a07615b76853 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC721ContractInteractions.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/openzeppelin/ERC721ContractInteractions.java @@ -65,7 +65,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec callsERC721ContractInteractions() { + final HapiSpec callsERC721ContractInteractions() { final var CONTRACT = "GameItem"; final var nftId = BigInteger.ONE; final var CREATE_TX = "create"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ApproveAllowanceSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ApproveAllowanceSuite.java index b277addc5de5..7a25d7688bb4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ApproveAllowanceSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ApproveAllowanceSuite.java @@ -124,7 +124,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec nftAutoCreationIncludeAllowanceCheck() { + final HapiSpec nftAutoCreationIncludeAllowanceCheck() { final var ownerAccount = "owningAlias"; final var receivingAlias = "receivingAlias"; return defaultHapiSpec("NftAutoCreationIncludeAllowanceCheck") @@ -178,7 +178,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec htsTokenApproveToInnerContract() { + final HapiSpec htsTokenApproveToInnerContract() { final var approveTxn = "NestedChildren"; final var nestedContract = DIRECT_ERC_CALLEE; final var theSpender = SPENDER; @@ -245,7 +245,7 @@ private HapiSpec htsTokenApproveToInnerContract() { } @HapiTest - private HapiSpec htsTokenAllowance() { + final HapiSpec htsTokenAllowance() { final var theSpender = SPENDER; final var allowanceTxn = ALLOWANCE_TX; @@ -302,7 +302,7 @@ private HapiSpec htsTokenAllowance() { } @HapiTest - private HapiSpec htsTokenApprove() { + final HapiSpec htsTokenApprove() { final var approveTxn = "approveTxn"; final var theSpender = SPENDER; @@ -363,7 +363,7 @@ private HapiSpec htsTokenApprove() { } @HapiTest - private HapiSpec hapiNftIsApprovedForAll() { + final HapiSpec hapiNftIsApprovedForAll() { final var notApprovedTxn = "notApprovedTxn"; final var approvedForAllTxn = "approvedForAllTxn"; @@ -451,7 +451,7 @@ private HapiSpec hapiNftIsApprovedForAll() { } @HapiTest - private HapiSpec hapiNftGetApproved() { + final HapiSpec hapiNftGetApproved() { final var theSpender = SPENDER; final var theSpender2 = "spender2"; final var allowanceTxn = ALLOWANCE_TX; @@ -511,7 +511,7 @@ private HapiSpec hapiNftGetApproved() { } @HapiTest - private HapiSpec hapiNftSetApprovalForAll() { + final HapiSpec hapiNftSetApprovalForAll() { final var theSpender = SPENDER; final var theSpender2 = "spender2"; final var allowanceTxn = ALLOWANCE_TX; @@ -578,27 +578,27 @@ private HapiSpec hapiNftSetApprovalForAll() { } @HapiTest - private HapiSpec testIndirectApprovalWithDelegatePrecompileCallee() { + final HapiSpec testIndirectApprovalWithDelegatePrecompileCallee() { return testIndirectApprovalWith("DelegatePrecompileCallee", DELEGATE_PRECOMPILE_CALLEE, false); } @HapiTest - private HapiSpec testIndirectApprovalWithDirectPrecompileCallee() { + final HapiSpec testIndirectApprovalWithDirectPrecompileCallee() { return testIndirectApprovalWith("DirectPrecompileCallee", DIRECT_PRECOMPILE_CALLEE, true); } @HapiTest - private HapiSpec testIndirectApprovalWithDelegateErc20Callee() { + final HapiSpec testIndirectApprovalWithDelegateErc20Callee() { return testIndirectApprovalWith("DelegateErc20Callee", DELEGATE_ERC_CALLEE, false); } @HapiTest - private HapiSpec testIndirectApprovalWithDirectErc20Callee() { + final HapiSpec testIndirectApprovalWithDirectErc20Callee() { return testIndirectApprovalWith("DirectErc20Callee", DIRECT_ERC_CALLEE, true); } @BddMethodIsNotATest - private HapiSpec testIndirectApprovalWith( + final HapiSpec testIndirectApprovalWith( @NonNull final String testName, @NonNull final String callee, final boolean expectGrantedApproval) { final AtomicReference tokenID = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AssociatePrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AssociatePrecompileSuite.java index 17fa58e3f475..5c399d134f9a 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AssociatePrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AssociatePrecompileSuite.java @@ -117,7 +117,7 @@ List positiveSpecs() { /* -- HSCS-PREC-27 from HTS Precompile Test Plan -- */ @HapiTest - private HapiSpec functionCallWithLessThanFourBytesFailsWithinSingleContractCall() { + final HapiSpec functionCallWithLessThanFourBytesFailsWithinSingleContractCall() { return defaultHapiSpec("functionCallWithLessThanFourBytesFailsWithinSingleContractCall") .given(uploadInitCode(THE_GRACEFULLY_FAILING_CONTRACT), contractCreate(THE_GRACEFULLY_FAILING_CONTRACT)) .when(contractCall( @@ -133,7 +133,7 @@ private HapiSpec functionCallWithLessThanFourBytesFailsWithinSingleContractCall( /* -- HSCS-PREC-27 from HTS Precompile Test Plan -- */ @HapiTest - private HapiSpec invalidAbiCallGracefullyFailsWithinSingleContractCall() { + final HapiSpec invalidAbiCallGracefullyFailsWithinSingleContractCall() { return defaultHapiSpec("invalidAbiCallGracefullyFailsWithinSingleContractCall") .given(uploadInitCode(THE_GRACEFULLY_FAILING_CONTRACT), contractCreate(THE_GRACEFULLY_FAILING_CONTRACT)) .when(contractCall( @@ -151,7 +151,7 @@ private HapiSpec invalidAbiCallGracefullyFailsWithinSingleContractCall() { /* -- HSCS-PREC-26 from HTS Precompile Test Plan -- */ @HapiTest - private HapiSpec nonSupportedAbiCallGracefullyFailsWithinSingleContractCall() { + final HapiSpec nonSupportedAbiCallGracefullyFailsWithinSingleContractCall() { return defaultHapiSpec("nonSupportedAbiCallGracefullyFailsWithinSingleContractCall") .given(uploadInitCode(THE_GRACEFULLY_FAILING_CONTRACT), contractCreate(THE_GRACEFULLY_FAILING_CONTRACT)) .when(contractCall( @@ -166,7 +166,7 @@ private HapiSpec nonSupportedAbiCallGracefullyFailsWithinSingleContractCall() { /* -- HSCS-PREC-26 from HTS Precompile Test Plan -- */ @HapiTest - private HapiSpec nonSupportedAbiCallGracefullyFailsWithMultipleContractCalls() { + final HapiSpec nonSupportedAbiCallGracefullyFailsWithMultipleContractCalls() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); @@ -215,7 +215,7 @@ private HapiSpec nonSupportedAbiCallGracefullyFailsWithMultipleContractCalls() { /* -- HSCS-PREC-27 from HTS Precompile Test Plan -- */ @HapiTest - private HapiSpec invalidlyFormattedAbiCallGracefullyFailsWithMultipleContractCalls() { + final HapiSpec invalidlyFormattedAbiCallGracefullyFailsWithMultipleContractCalls() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); final var invalidAbiArgument = new byte[20]; @@ -273,7 +273,7 @@ private HapiSpec invalidlyFormattedAbiCallGracefullyFailsWithMultipleContractCal } @HapiTest - private HapiSpec associateWithMissingEvmAddressHasSaneTxnAndRecord() { + final HapiSpec associateWithMissingEvmAddressHasSaneTxnAndRecord() { final AtomicReference
tokenAddress = new AtomicReference<>(); final var missingAddress = Address.wrap(Address.toChecksumAddress("0xabababababababababababababababababababab")); @@ -299,7 +299,7 @@ private HapiSpec associateWithMissingEvmAddressHasSaneTxnAndRecord() { /* -- HSCS-PREC-27 from HTS Precompile Test Plan -- */ @HapiTest - private HapiSpec invalidSingleAbiCallConsumesAllProvidedGas() { + final HapiSpec invalidSingleAbiCallConsumesAllProvidedGas() { return defaultHapiSpec("invalidSingleAbiCallConsumesAllProvidedGas") .given(uploadInitCode(THE_GRACEFULLY_FAILING_CONTRACT), contractCreate(THE_GRACEFULLY_FAILING_CONTRACT)) .when( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AssociatePrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AssociatePrecompileV1SecurityModelSuite.java index 2925f2b91785..a75a361ea69a 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AssociatePrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AssociatePrecompileV1SecurityModelSuite.java @@ -101,7 +101,7 @@ List positiveSpecs() { } /* -- HSCS-PREC-006 from HTS Precompile Test Plan -- */ - private HapiSpec multipleAssociatePrecompileWithSignatureWorksForFungible() { + final HapiSpec multipleAssociatePrecompileWithSignatureWorksForFungible() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference frozenTokenID = new AtomicReference<>(); final AtomicReference unfrozenTokenID = new AtomicReference<>(); @@ -184,7 +184,7 @@ private HapiSpec multipleAssociatePrecompileWithSignatureWorksForFungible() { } /* -- HSCS-PREC-010 from HTS Precompile Test Plan -- */ - private HapiSpec nestedAssociateWorksAsExpected() { + final HapiSpec nestedAssociateWorksAsExpected() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AtomicCryptoTransferHTSSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AtomicCryptoTransferHTSSuite.java index c1c10a2839c9..f086317c9058 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AtomicCryptoTransferHTSSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/AtomicCryptoTransferHTSSuite.java @@ -134,7 +134,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec cryptoTransferForHbarOnly() { + final HapiSpec cryptoTransferForHbarOnly() { final var cryptoTransferTxn = "cryptoTransferTxn"; final var cryptoTransferMultiTxn = "cryptoTransferMultiTxn"; final var cryptoTransferRevertTxn = "cryptoTransferRevertTxn"; @@ -328,7 +328,7 @@ private HapiSpec cryptoTransferForHbarOnly() { } @HapiTest - private HapiSpec cryptoTransferForFungibleTokenOnly() { + final HapiSpec cryptoTransferForFungibleTokenOnly() { final var cryptoTransferTxnForFungible = "cryptoTransferTxnForFungible"; return propertyPreservingHapiSpec("cryptoTransferForFungibleTokenOnly") @@ -403,7 +403,7 @@ private HapiSpec cryptoTransferForFungibleTokenOnly() { } @HapiTest - private HapiSpec cryptoTransferForNonFungibleTokenOnly() { + final HapiSpec cryptoTransferForNonFungibleTokenOnly() { final var cryptoTransferTxnForNft = "cryptoTransferTxnForNft"; return propertyPreservingHapiSpec("cryptoTransferForNonFungibleTokenOnly") @@ -477,7 +477,7 @@ private HapiSpec cryptoTransferForNonFungibleTokenOnly() { } @HapiTest - private HapiSpec cryptoTransferHBarFungibleNft() { + final HapiSpec cryptoTransferHBarFungibleNft() { final var cryptoTransferTxnForAll = "cryptoTransferTxnForAll"; return propertyPreservingHapiSpec("cryptoTransferHBarFungibleNft") @@ -605,7 +605,7 @@ private HapiSpec cryptoTransferHBarFungibleNft() { } @HapiTest - private HapiSpec cryptoTransferAllowanceHbarToken() { + final HapiSpec cryptoTransferAllowanceHbarToken() { final var allowance = 10L; final var successfulTransferFromTxn = "txn"; final var successfulTransferFromTxn2 = "txn2"; @@ -768,7 +768,7 @@ private HapiSpec cryptoTransferAllowanceHbarToken() { } @HapiTest - private HapiSpec cryptoTransferAllowanceFungibleToken() { + final HapiSpec cryptoTransferAllowanceFungibleToken() { final var allowance = 10L; final var successfulTransferFromTxn = "txn"; final var successfulTransferFromTxn2 = "txn2"; @@ -956,7 +956,7 @@ private HapiSpec cryptoTransferAllowanceFungibleToken() { } @HapiTest - private HapiSpec cryptoTransferAllowanceNft() { + final HapiSpec cryptoTransferAllowanceNft() { final var successfulTransferFromTxn = "txn"; final var revertingTransferFromTxnNft = "revertWhenMoreThanAllowanceNft"; return propertyPreservingHapiSpec("cryptoTransferAllowanceNft") @@ -1040,7 +1040,7 @@ private HapiSpec cryptoTransferAllowanceNft() { } @HapiTest - private HapiSpec cryptoTransferSpecialAccounts() { + final HapiSpec cryptoTransferSpecialAccounts() { final var cryptoTransferTxn = "cryptoTransferTxn"; return propertyPreservingHapiSpec("cryptoTransferEmptyKeyList") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractBurnHTSSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractBurnHTSSuite.java index 9376d240c0a2..3397450d7bde 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractBurnHTSSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractBurnHTSSuite.java @@ -90,7 +90,7 @@ List positiveSpecs() { } @HapiTest - private HapiSpec burnFungibleV1andV2WithZeroAndNegativeValues() { + final HapiSpec burnFungibleV1andV2WithZeroAndNegativeValues() { final AtomicReference
tokenAddress = new AtomicReference<>(); return defaultHapiSpec("burnFungibleV1andV2WithZeroAndNegativeValues") .given( @@ -154,7 +154,7 @@ private HapiSpec burnFungibleV1andV2WithZeroAndNegativeValues() { } @HapiTest - private HapiSpec burnNonFungibleV1andV2WithNegativeValues() { + final HapiSpec burnNonFungibleV1andV2WithNegativeValues() { final AtomicReference
tokenAddress = new AtomicReference<>(); return defaultHapiSpec("burnNonFungibleV1andV2WithNegativeValues") .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractBurnHTSV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractBurnHTSV1SecurityModelSuite.java index 2efde6f56adc..639c63ab377c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractBurnHTSV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractBurnHTSV1SecurityModelSuite.java @@ -117,7 +117,7 @@ List positiveSpecs() { hscsPrec011BurnAfterNestedMint()); } - private HapiSpec hscsPreC020RollbackBurnThatFailsAfterAPrecompileTransfer() { + final HapiSpec hscsPreC020RollbackBurnThatFailsAfterAPrecompileTransfer() { final var bob = "bob"; final var feeCollector = "feeCollector"; final var tokenWithHbarFee = "tokenWithHbarFee"; @@ -202,7 +202,7 @@ private HapiSpec hscsPreC020RollbackBurnThatFailsAfterAPrecompileTransfer() { getAccountBalance(ALICE).hasTokenBalance(tokenWithHbarFee, 1)); } - private HapiSpec hscsPrec004TokenBurnOfFungibleTokenUnits() { + final HapiSpec hscsPrec004TokenBurnOfFungibleTokenUnits() { final var gasUsed = 14085L; return propertyPreservingHapiSpec("hscsPrec004TokenBurnOfFungibleTokenUnits") .preserving(CONTRACTS_ALLOW_SYSTEM_USE_OF_HAPI_SIGS, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -287,7 +287,7 @@ private HapiSpec hscsPrec004TokenBurnOfFungibleTokenUnits() { .then(getAccountBalance(TOKEN_TREASURY).hasTokenBalance(TOKEN, 48)); } - private HapiSpec hscsPrec005TokenBurnOfNft() { + final HapiSpec hscsPrec005TokenBurnOfNft() { final var gasUsed = 14085; return propertyPreservingHapiSpec("hscsPrec005TokenBurnOfNft") .preserving(CONTRACTS_ALLOW_SYSTEM_USE_OF_HAPI_SIGS, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -344,7 +344,7 @@ private HapiSpec hscsPrec005TokenBurnOfNft() { .then(getAccountBalance(TOKEN_TREASURY).hasTokenBalance(TOKEN, 1)); } - private HapiSpec hscsPrec011BurnAfterNestedMint() { + final HapiSpec hscsPrec011BurnAfterNestedMint() { final var innerContract = "MintToken"; final var outerContract = "NestedBurn"; final var revisedKey = KeyShape.threshOf(1, SIMPLE, DELEGATE_CONTRACT, DELEGATE_CONTRACT); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractHTSSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractHTSSuite.java index 2594ea0ac0ba..c675c991e72d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractHTSSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractHTSSuite.java @@ -94,7 +94,7 @@ List positiveSpecs() { } @HapiTest - private HapiSpec nonZeroTransfersFail() { + final HapiSpec nonZeroTransfersFail() { final var theSecondReceiver = "somebody2"; return defaultHapiSpec("NonZeroTransfersFail") .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractHTSV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractHTSV1SecurityModelSuite.java index ef247f17ce07..c62e5b9d2c62 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractHTSV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractHTSV1SecurityModelSuite.java @@ -136,7 +136,7 @@ List positiveSpecs() { hbarTransferFromFeeCollector()); } - private HapiSpec hscsPrec017RollbackAfterInsufficientBalance() { + final HapiSpec hscsPrec017RollbackAfterInsufficientBalance() { final var alice = "alice"; final var bob = "bob"; final var treasuryForToken = "treasuryForToken"; @@ -217,7 +217,7 @@ private HapiSpec hscsPrec017RollbackAfterInsufficientBalance() { .has(AccountInfoAsserts.accountWith().balance(0L))); } - private HapiSpec depositAndWithdrawFungibleTokens() { + final HapiSpec depositAndWithdrawFungibleTokens() { final var theContract = "ZenosBank"; return propertyPreservingHapiSpec("depositAndWithdrawFungibleTokens") @@ -296,7 +296,7 @@ private HapiSpec depositAndWithdrawFungibleTokens() { .including(A_TOKEN, RECEIVER, 25L)))); } - private HapiSpec distributeMultipleTokens() { + final HapiSpec distributeMultipleTokens() { final var theSecondReceiver = "somebody2"; return propertyPreservingHapiSpec("distributeMultipleTokens") @@ -366,7 +366,7 @@ private HapiSpec distributeMultipleTokens() { .including(A_TOKEN, theSecondReceiver, 5L)))); } - private HapiSpec tokenTransferFromFeeCollector() { + final HapiSpec tokenTransferFromFeeCollector() { return propertyPreservingHapiSpec("tokenTransferFromFeeCollector") .preserving(CONTRACTS_ALLOW_SYSTEM_USE_OF_HAPI_SIGS, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( @@ -521,7 +521,7 @@ private HapiSpec tokenTransferFromFeeCollector() { getAccountBalance(FEE_COLLECTOR).hasTokenBalance(FEE_TOKEN, 0)); } - private HapiSpec tokenTransferFromFeeCollectorStaticNestedCall() { + final HapiSpec tokenTransferFromFeeCollectorStaticNestedCall() { return propertyPreservingHapiSpec("tokenTransferFromFeeCollectorStaticNestedCall") .preserving(CONTRACTS_ALLOW_SYSTEM_USE_OF_HAPI_SIGS, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( @@ -681,7 +681,7 @@ private HapiSpec tokenTransferFromFeeCollectorStaticNestedCall() { * Contract that otherwise wouldn't have enough balance for a transfer of hbars can perform the transfer after * collecting the custom hbar fees from a nested token transfer through the HTS precompile * */ - private HapiSpec hbarTransferFromFeeCollector() { + final HapiSpec hbarTransferFromFeeCollector() { final var outerContract = "HbarFeeCollector"; final var innerContract = "NestedHTSTransferrer"; @@ -761,7 +761,7 @@ private HapiSpec hbarTransferFromFeeCollector() { getAccountBalance(SECOND_RECEIVER).hasTinyBars(CUSTOM_HBAR_FEE_AMOUNT)); } - private HapiSpec transferNft() { + final HapiSpec transferNft() { return propertyPreservingHapiSpec("transferNft") .preserving(CONTRACTS_ALLOW_SYSTEM_USE_OF_HAPI_SIGS, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( @@ -832,7 +832,7 @@ private HapiSpec transferNft() { .including(NFT, ACCOUNT, RECEIVER, 1L)))); } - private HapiSpec transferMultipleNfts() { + final HapiSpec transferMultipleNfts() { return propertyPreservingHapiSpec("transferMultipleNfts") .preserving(CONTRACTS_ALLOW_SYSTEM_USE_OF_HAPI_SIGS, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysHTSSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysHTSSuite.java index e43c9daf00e7..7a4753842122 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysHTSSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysHTSSuite.java @@ -227,7 +227,7 @@ List hscsKey6() { } @HapiTest - private HapiSpec burnWithKeyAsPartOf1OfXThreshold() { + final HapiSpec burnWithKeyAsPartOf1OfXThreshold() { final var delegateContractKeyShape = KeyShape.threshOf(1, SIMPLE, DELEGATE_CONTRACT); final var contractKeyShape = KeyShape.threshOf(1, SIMPLE, KeyShape.CONTRACT); @@ -293,7 +293,7 @@ private HapiSpec burnWithKeyAsPartOf1OfXThreshold() { } @HapiTest - private HapiSpec delegateCallForBurnWithContractKey() { + final HapiSpec delegateCallForBurnWithContractKey() { final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); return defaultHapiSpec( @@ -345,7 +345,7 @@ OUTER_CONTRACT, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec } @HapiTest - private HapiSpec delegateCallForMintWithContractKey() { + final HapiSpec delegateCallForMintWithContractKey() { final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); return defaultHapiSpec( @@ -395,7 +395,7 @@ OUTER_CONTRACT, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec } @HapiTest - private HapiSpec staticCallForDissociatePrecompileFails() { + final HapiSpec staticCallForDissociatePrecompileFails() { final var outerContract = NESTED_ASSOCIATE_DISSOCIATE; final var nestedContract = ASSOCIATE_DISSOCIATE_CONTRACT; final AtomicReference accountID = new AtomicReference<>(); @@ -435,7 +435,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(nestedContract, spec)) } @HapiTest - private HapiSpec staticCallForTransferWithContractKey() { + final HapiSpec staticCallForTransferWithContractKey() { final var outerContract = STATIC_CONTRACT; final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); @@ -487,7 +487,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec) } @HapiTest - private HapiSpec staticCallForBurnWithContractKey() { + final HapiSpec staticCallForBurnWithContractKey() { final var outerContract = STATIC_CONTRACT; final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); @@ -530,7 +530,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec) } @HapiTest - private HapiSpec staticCallForMintWithContractKey() { + final HapiSpec staticCallForMintWithContractKey() { final var outerContract = STATIC_CONTRACT; final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); @@ -570,7 +570,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec) } @HapiTest - private HapiSpec staticCallForTransferWithDelegateContractKey() { + final HapiSpec staticCallForTransferWithDelegateContractKey() { final var outerContract = STATIC_CONTRACT; final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); @@ -623,7 +623,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec) } @HapiTest - private HapiSpec staticCallForBurnWithDelegateContractKey() { + final HapiSpec staticCallForBurnWithDelegateContractKey() { final var outerContract = STATIC_CONTRACT; final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); @@ -669,7 +669,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec) } @HapiTest - private HapiSpec staticCallForMintWithDelegateContractKey() { + final HapiSpec staticCallForMintWithDelegateContractKey() { final var outerContract = STATIC_CONTRACT; final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); @@ -711,7 +711,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec) } @HapiTest - private HapiSpec staticCallForAssociatePrecompileFails() { + final HapiSpec staticCallForAssociatePrecompileFails() { final var outerContract = NESTED_ASSOCIATE_DISSOCIATE; final var nestedContract = ASSOCIATE_DISSOCIATE_CONTRACT; final AtomicReference accountID = new AtomicReference<>(); @@ -753,7 +753,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(nestedContract, spec)) } @HapiTest - private HapiSpec callForMintWithContractKey() { + final HapiSpec callForMintWithContractKey() { final var firstMintTxn = "firstMintTxn"; final var amount = 10L; @@ -807,7 +807,7 @@ private HapiSpec callForMintWithContractKey() { } @HapiTest - private HapiSpec callForMintWithDelegateContractKey() { + final HapiSpec callForMintWithDelegateContractKey() { final var firstMintTxn = "firstMintTxn"; final var amount = 10L; @@ -864,7 +864,7 @@ private HapiSpec callForMintWithDelegateContractKey() { } @HapiTest - private HapiSpec callForTransferWithContractKey() { + final HapiSpec callForTransferWithContractKey() { return defaultHapiSpec( "callForTransferWithContractKey", NONDETERMINISTIC_FUNCTION_PARAMETERS, @@ -926,7 +926,7 @@ private HapiSpec callForTransferWithContractKey() { } @HapiTest - private HapiSpec callForTransferWithDelegateContractKey() { + final HapiSpec callForTransferWithDelegateContractKey() { return defaultHapiSpec( "callForTransferWithDelegateContractKey", NONDETERMINISTIC_FUNCTION_PARAMETERS, @@ -988,7 +988,7 @@ private HapiSpec callForTransferWithDelegateContractKey() { } @HapiTest - private HapiSpec callForAssociateWithDelegateContractKey() { + final HapiSpec callForAssociateWithDelegateContractKey() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); @@ -1032,7 +1032,7 @@ private HapiSpec callForAssociateWithDelegateContractKey() { } @HapiTest - private HapiSpec callForAssociateWithContractKey() { + final HapiSpec callForAssociateWithContractKey() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); @@ -1215,7 +1215,7 @@ public HapiSpec callForDissociateWithContractKey() { } @HapiTest - private HapiSpec callForBurnWithDelegateContractKey() { + final HapiSpec callForBurnWithDelegateContractKey() { return defaultHapiSpec( "callForBurnWithDelegateContractKey", NONDETERMINISTIC_CONSTRUCTOR_PARAMETERS, @@ -1261,7 +1261,7 @@ private HapiSpec callForBurnWithDelegateContractKey() { } @HapiTest - private HapiSpec delegateCallForAssociatePrecompileSignedWithDelegateContractKeyWorks() { + final HapiSpec delegateCallForAssociatePrecompileSignedWithDelegateContractKeyWorks() { final var outerContract = NESTED_ASSOCIATE_DISSOCIATE; final var nestedContract = ASSOCIATE_DISSOCIATE_CONTRACT; final AtomicReference accountID = new AtomicReference<>(); @@ -1310,7 +1310,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(nestedContract, spec)) } @HapiTest - private HapiSpec delegateCallForDissociatePrecompileSignedWithDelegateContractKeyWorks() { + final HapiSpec delegateCallForDissociatePrecompileSignedWithDelegateContractKeyWorks() { final var outerContract = NESTED_ASSOCIATE_DISSOCIATE; final var nestedContract = ASSOCIATE_DISSOCIATE_CONTRACT; final AtomicReference accountID = new AtomicReference<>(); @@ -1360,7 +1360,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(nestedContract, spec)) } @HapiTest - private HapiSpec associatePrecompileWithDelegateContractKeyForNonFungibleWithKYC() { + final HapiSpec associatePrecompileWithDelegateContractKeyForNonFungibleWithKYC() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference kycTokenID = new AtomicReference<>(); @@ -1919,7 +1919,7 @@ public HapiSpec dissociatePrecompileWithDelegateContractKeyForNonFungibleWithKYC } @HapiTest - private HapiSpec associatePrecompileWithDelegateContractKeyForNonFungibleFrozen() { + final HapiSpec associatePrecompileWithDelegateContractKeyForNonFungibleFrozen() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference frozenTokenID = new AtomicReference<>(); @@ -2004,7 +2004,7 @@ private HapiSpec associatePrecompileWithDelegateContractKeyForNonFungibleFrozen( } @HapiTest - private HapiSpec associatePrecompileWithDelegateContractKeyForNonFungibleVanilla() { + final HapiSpec associatePrecompileWithDelegateContractKeyForNonFungibleVanilla() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); @@ -2085,7 +2085,7 @@ private HapiSpec associatePrecompileWithDelegateContractKeyForNonFungibleVanilla } @HapiTest - private HapiSpec associatePrecompileWithDelegateContractKeyForFungibleWithKYC() { + final HapiSpec associatePrecompileWithDelegateContractKeyForFungibleWithKYC() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference kycTokenID = new AtomicReference<>(); @@ -2167,7 +2167,7 @@ private HapiSpec associatePrecompileWithDelegateContractKeyForFungibleWithKYC() } @HapiTest - private HapiSpec associatePrecompileWithDelegateContractKeyForFungibleFrozen() { + final HapiSpec associatePrecompileWithDelegateContractKeyForFungibleFrozen() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference frozenTokenID = new AtomicReference<>(); @@ -2250,7 +2250,7 @@ private HapiSpec associatePrecompileWithDelegateContractKeyForFungibleFrozen() { } @HapiTest - private HapiSpec associatePrecompileWithDelegateContractKeyForFungibleVanilla() { + final HapiSpec associatePrecompileWithDelegateContractKeyForFungibleVanilla() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); @@ -2328,7 +2328,7 @@ private HapiSpec associatePrecompileWithDelegateContractKeyForFungibleVanilla() } @HapiTest - private HapiSpec delegateCallForAssociatePrecompileSignedWithContractKeyFails() { + final HapiSpec delegateCallForAssociatePrecompileSignedWithContractKeyFails() { final var outerContract = NESTED_ASSOCIATE_DISSOCIATE; final var nestedContract = ASSOCIATE_DISSOCIATE_CONTRACT; final AtomicReference accountID = new AtomicReference<>(); @@ -2376,7 +2376,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(nestedContract, spec)) } @HapiTest - private HapiSpec delegateCallForDissociatePrecompileSignedWithContractKeyFails() { + final HapiSpec delegateCallForDissociatePrecompileSignedWithContractKeyFails() { final var outerContract = NESTED_ASSOCIATE_DISSOCIATE; final var nestedContract = ASSOCIATE_DISSOCIATE_CONTRACT; final AtomicReference accountID = new AtomicReference<>(); @@ -2425,7 +2425,7 @@ outerContract, asHeadlongAddress(getNestedContractAddress(nestedContract, spec)) } @HapiTest - private HapiSpec callForBurnWithContractKey() { + final HapiSpec callForBurnWithContractKey() { return defaultHapiSpec( "callForBurnWithContractKey", NONDETERMINISTIC_CONSTRUCTOR_PARAMETERS, diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysHTSV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysHTSV1SecurityModelSuite.java index d6e3dceeec32..73f4fa7d31ea 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysHTSV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysHTSV1SecurityModelSuite.java @@ -113,7 +113,7 @@ public List getSpecsInSuite() { burnTokenWithFullPrefixAndPartialPrefixKeys()); } - private HapiSpec transferWithKeyAsPartOf2OfXThreshold() { + final HapiSpec transferWithKeyAsPartOf2OfXThreshold() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); final AtomicReference receiverID = new AtomicReference<>(); @@ -178,7 +178,7 @@ OUTER_CONTRACT, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec getAccountBalance(RECEIVER).hasTokenBalance(VANILLA_TOKEN, 1)); } - private HapiSpec delegateCallForTransferWithContractKey() { + final HapiSpec delegateCallForTransferWithContractKey() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); final AtomicReference receiverID = new AtomicReference<>(); @@ -240,7 +240,7 @@ OUTER_CONTRACT, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec getAccountBalance(RECEIVER).hasTokenBalance(VANILLA_TOKEN, 0)); } - private HapiSpec burnTokenWithFullPrefixAndPartialPrefixKeys() { + final HapiSpec burnTokenWithFullPrefixAndPartialPrefixKeys() { final var firstBurnTxn = "firstBurnTxn"; final var secondBurnTxn = "secondBurnTxn"; final var amount = 99L; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysStillWorkAsExpectedSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysStillWorkAsExpectedSuite.java index 27032bbb8df0..1b8794c8d911 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysStillWorkAsExpectedSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysStillWorkAsExpectedSuite.java @@ -105,7 +105,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec approvalFallbacksRequiredWithoutTopLevelSigAccess() { + final HapiSpec approvalFallbacksRequiredWithoutTopLevelSigAccess() { final AtomicReference
fungibleTokenMirrorAddr = new AtomicReference<>(); final AtomicReference
nonFungibleTokenMirrorAddr = new AtomicReference<>(); final AtomicReference
aSenderAddr = new AtomicReference<>(); @@ -331,7 +331,7 @@ private HapiSpecOperation someWellKnownOperationsWithAllNeededSigsInSigMap( } @HapiTest - private HapiSpec canStillTransferByVirtueOfContractIdInEOAThreshold() { + final HapiSpec canStillTransferByVirtueOfContractIdInEOAThreshold() { final var fungibleToken = "token"; final var managementContract = "DoTokenManagement"; final AtomicReference
tokenMirrorAddr = new AtomicReference<>(); @@ -394,7 +394,7 @@ private HapiSpec canStillTransferByVirtueOfContractIdInEOAThreshold() { } @HapiTest - private HapiSpec contractKeysStillHaveSpecificityNoMatterTopLevelSignatures() { + final HapiSpec contractKeysStillHaveSpecificityNoMatterTopLevelSignatures() { final var fungibleToken = "token"; final var managementContract = "DoTokenManagement"; final var otherContractAsKey = "otherContractAsKey"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysStillWorkAsExpectedV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysStillWorkAsExpectedV1SecurityModelSuite.java index 2d4825be7816..8f8ebed2e3ef 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysStillWorkAsExpectedV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractKeysStillWorkAsExpectedV1SecurityModelSuite.java @@ -103,7 +103,7 @@ public List getSpecsInSuite() { fixedFeeFailsWhenDisabledButWorksWhenEnabled()); } - private HapiSpec fixedFeeFailsWhenDisabledButWorksWhenEnabled() { + final HapiSpec fixedFeeFailsWhenDisabledButWorksWhenEnabled() { final AtomicReference
senderAddr = new AtomicReference<>(); final AtomicReference
receiverAddr = new AtomicReference<>(); final AtomicReference
nonFungibleTokenMirrorAddr = new AtomicReference<>(); @@ -176,7 +176,7 @@ private HapiSpec fixedFeeFailsWhenDisabledButWorksWhenEnabled() { .alsoSigningWithFullPrefix(sender))); } - private HapiSpec fallbackFeePayerMustSign() { + final HapiSpec fallbackFeePayerMustSign() { final AtomicReference
senderAddr = new AtomicReference<>(); final AtomicReference
receiverAddr = new AtomicReference<>(); final AtomicReference
nonFungibleTokenMirrorAddr = new AtomicReference<>(); @@ -269,7 +269,7 @@ private HapiSpec fallbackFeePayerMustSign() { getAccountBalance(receiver).hasTinyBars(0L)); } - private HapiSpec fallbackFeeForHtsPayerMustSign() { + final HapiSpec fallbackFeeForHtsPayerMustSign() { final AtomicReference
senderAddr = new AtomicReference<>(); final AtomicReference
receiverAddr = new AtomicReference<>(); final AtomicReference
nonFungibleTokenMirrorAddr = new AtomicReference<>(); @@ -349,7 +349,7 @@ private HapiSpec fallbackFeeForHtsPayerMustSign() { getAccountBalance(receiver).hasTokenBalance(fungible, 9)); } - private HapiSpec contractCanStillTransferItsOwnAssets() { + final HapiSpec contractCanStillTransferItsOwnAssets() { final AtomicReference
fungibleTokenMirrorAddr = new AtomicReference<>(); final AtomicReference
nonFungibleTokenMirrorAddr = new AtomicReference<>(); final AtomicReference
aSenderAddr = new AtomicReference<>(); @@ -409,7 +409,7 @@ private HapiSpec contractCanStillTransferItsOwnAssets() { someWellKnownAssertions()); } - private HapiSpec topLevelSigsStillWorkWithDefaultGrandfatherNum() { + final HapiSpec topLevelSigsStillWorkWithDefaultGrandfatherNum() { final AtomicReference
fungibleTokenMirrorAddr = new AtomicReference<>(); final AtomicReference
nonFungibleTokenMirrorAddr = new AtomicReference<>(); final AtomicReference
aSenderAddr = new AtomicReference<>(); @@ -584,7 +584,7 @@ private HapiSpecOperation someWellKnownOperationsWithAllNeededSigsInSigMap( .hasKnownStatus(expectedStatus))); } - private HapiSpec contractKeysWorkAsExpectedForFungibleTokenMgmt() { + final HapiSpec contractKeysWorkAsExpectedForFungibleTokenMgmt() { final var fungibleToken = "token"; final var managementContract = "DoTokenManagement"; final var mgmtContractAsKey = "mgmtContractAsKey"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractMintHTSSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractMintHTSSuite.java index 44959c64dc0a..27902aef38ad 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractMintHTSSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractMintHTSSuite.java @@ -118,7 +118,7 @@ List positiveSpecs() { } @HapiTest - private HapiSpec transferNftAfterNestedMint() { + final HapiSpec transferNftAfterNestedMint() { final var nestedTransferTxn = "nestedTransferTxn"; return defaultHapiSpec( @@ -220,7 +220,7 @@ private HapiSpec transferNftAfterNestedMint() { @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec rollbackOnFailedMintAfterFungibleTransfer() { + final HapiSpec rollbackOnFailedMintAfterFungibleTransfer() { final var failedMintTxn = "failedMintTxn"; return defaultHapiSpec( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractMintHTSV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractMintHTSV1SecurityModelSuite.java index cb4ea48c034d..72382bfe824b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractMintHTSV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ContractMintHTSV1SecurityModelSuite.java @@ -125,7 +125,7 @@ List positiveSpecs() { happyPathZeroUnitFungibleTokenMint()); } - private HapiSpec happyPathZeroUnitFungibleTokenMint() { + final HapiSpec happyPathZeroUnitFungibleTokenMint() { final var amount = 0L; final var gasUsed = 14085L; final AtomicReference fungible = new AtomicReference<>(); @@ -169,7 +169,7 @@ private HapiSpec happyPathZeroUnitFungibleTokenMint() { .newTotalSupply(0))); } - private HapiSpec helloWorldFungibleMint() { + final HapiSpec helloWorldFungibleMint() { final var amount = 1_234_567L; final AtomicReference fungible = new AtomicReference<>(); @@ -217,7 +217,7 @@ private HapiSpec helloWorldFungibleMint() { changingFungibleBalances().including(FUNGIBLE_TOKEN, DEFAULT_PAYER, amount)))); } - private HapiSpec helloWorldNftMint() { + final HapiSpec helloWorldNftMint() { final AtomicReference nonFungible = new AtomicReference<>(); return propertyPreservingHapiSpec("helloWorldNftMint") @@ -280,7 +280,7 @@ private HapiSpec helloWorldNftMint() { .serialNos(List.of(2L)))); } - private HapiSpec happyPathFungibleTokenMint() { + final HapiSpec happyPathFungibleTokenMint() { final var amount = 10L; final var gasUsed = 14085L; final AtomicReference fungible = new AtomicReference<>(); @@ -334,7 +334,7 @@ private HapiSpec happyPathFungibleTokenMint() { .newTotalSupply(10))); } - private HapiSpec happyPathNonFungibleTokenMint() { + final HapiSpec happyPathNonFungibleTokenMint() { final var totalSupply = 2; final AtomicReference nonFungible = new AtomicReference<>(); @@ -391,7 +391,7 @@ private HapiSpec happyPathNonFungibleTokenMint() { .serialNos(Arrays.asList(1L, 2L)))); } - private HapiSpec rollbackOnFailedAssociateAfterNonFungibleMint() { + final HapiSpec rollbackOnFailedAssociateAfterNonFungibleMint() { final var nestedMintTxn = "nestedMintTxn"; return propertyPreservingHapiSpec("rollbackOnFailedAssociateAfterNonFungibleMint") @@ -449,7 +449,7 @@ private HapiSpec rollbackOnFailedAssociateAfterNonFungibleMint() { htsPrecompileResult().withStatus(INVALID_TOKEN_ID))))); } - private HapiSpec gasCostNotMetSetsInsufficientGasStatusInChildRecord() { + final HapiSpec gasCostNotMetSetsInsufficientGasStatusInChildRecord() { final var amount = 10L; final var baselineMintWithEnoughGas = "baselineMintWithEnoughGas"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CreatePrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CreatePrecompileSuite.java index 9a0b1e78ec00..e30c1a6efd30 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CreatePrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CreatePrecompileSuite.java @@ -126,7 +126,7 @@ List negativeSpecs() { // TEST-007 & TEST-016 // Should fail on insufficient value sent @HapiTest - private HapiSpec tokenCreateWithEmptyKeysReverts() { + final HapiSpec tokenCreateWithEmptyKeysReverts() { return defaultHapiSpec("tokenCreateWithEmptyKeysReverts") .given( cryptoCreate(ACCOUNT).balance(ONE_MILLION_HBARS), @@ -172,7 +172,7 @@ private HapiSpec tokenCreateWithEmptyKeysReverts() { // TEST-008 @HapiTest - private HapiSpec tokenCreateWithKeyWithMultipleKeyValuesReverts() { + final HapiSpec tokenCreateWithKeyWithMultipleKeyValuesReverts() { return defaultHapiSpec("tokenCreateWithKeyWithMultipleKeyValuesReverts") .given( cryptoCreate(ACCOUNT).balance(ONE_MILLION_HBARS), @@ -201,7 +201,7 @@ private HapiSpec tokenCreateWithKeyWithMultipleKeyValuesReverts() { // TEST-009 @HapiTest - private HapiSpec tokenCreateWithFixedFeeWithMultiplePaymentsReverts() { + final HapiSpec tokenCreateWithFixedFeeWithMultiplePaymentsReverts() { return defaultHapiSpec("tokenCreateWithFixedFeeWithMultiplePaymentsReverts") .given( newKeyNamed(ECDSA_KEY).shape(SECP256K1), @@ -238,7 +238,7 @@ private HapiSpec tokenCreateWithFixedFeeWithMultiplePaymentsReverts() { // TEST-010 & TEST-017 // Should fail on insufficient value sent @HapiTest - private HapiSpec createTokenWithEmptyTokenStruct() { + final HapiSpec createTokenWithEmptyTokenStruct() { return defaultHapiSpec("createTokenWithEmptyTokenStruct") .given(cryptoCreate(ACCOUNT).balance(ONE_MILLION_HBARS), uploadInitCode(TOKEN_CREATE_CONTRACT)) .when(withOpContext((spec, opLog) -> @@ -286,7 +286,7 @@ private HapiSpec createTokenWithEmptyTokenStruct() { // TEST-011 @HapiTest - private HapiSpec createTokenWithInvalidExpiry() { + final HapiSpec createTokenWithInvalidExpiry() { return defaultHapiSpec("createTokenWithInvalidExpiry") .given( newKeyNamed(ECDSA_KEY).shape(SECP256K1), @@ -322,7 +322,7 @@ private HapiSpec createTokenWithInvalidExpiry() { // TEST-013 @HapiTest - private HapiSpec createTokenWithInvalidTreasury() { + final HapiSpec createTokenWithInvalidTreasury() { return defaultHapiSpec("createTokenWithInvalidTreasury") .given( newKeyNamed(ED25519KEY).shape(ED25519), @@ -365,7 +365,7 @@ private HapiSpec createTokenWithInvalidTreasury() { // TEST-018 // Should fail on insufficient value sent @HapiTest - private HapiSpec createTokenWithInsufficientValueSent() { + final HapiSpec createTokenWithInsufficientValueSent() { return defaultHapiSpec("createTokenWithInsufficientValueSent") .given( newKeyNamed(ED25519KEY).shape(ED25519), @@ -424,7 +424,7 @@ private HapiSpec createTokenWithInsufficientValueSent() { // TEST-020 @HapiTest - private HapiSpec delegateCallTokenCreateFails() { + final HapiSpec delegateCallTokenCreateFails() { return defaultHapiSpec("delegateCallTokenCreateFails") .given( newKeyNamed(ED25519KEY).shape(ED25519), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CreatePrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CreatePrecompileV1SecurityModelSuite.java index 4633278731c3..4f1d4135e7a4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CreatePrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CreatePrecompileV1SecurityModelSuite.java @@ -125,7 +125,7 @@ List negativeSpecs() { } // TEST-001 - private HapiSpec fungibleTokenCreateHappyPath() { + final HapiSpec fungibleTokenCreateHappyPath() { final var tokenCreateContractAsKeyDelegate = "tokenCreateContractAsKeyDelegate"; final var createTokenNum = new AtomicLong(); return propertyPreservingHapiSpec("fungibleTokenCreateHappyPath") @@ -232,7 +232,7 @@ private HapiSpec fungibleTokenCreateHappyPath() { // TEST-002 - private HapiSpec inheritsSenderAutoRenewAccountIfAnyForNftCreate() { + final HapiSpec inheritsSenderAutoRenewAccountIfAnyForNftCreate() { final var createdNftTokenNum = new AtomicLong(); return propertyPreservingHapiSpec("inheritsSenderAutoRenewAccountIfAnyForNftCreate") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -298,7 +298,7 @@ private HapiSpec inheritsSenderAutoRenewAccountIfAnyForNftCreate() { })); } - private HapiSpec inheritsSenderAutoRenewAccountForTokenCreate() { + final HapiSpec inheritsSenderAutoRenewAccountForTokenCreate() { final var createTokenNum = new AtomicLong(); return propertyPreservingHapiSpec("inheritsSenderAutoRenewAccountForTokenCreate") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -368,7 +368,7 @@ private HapiSpec inheritsSenderAutoRenewAccountForTokenCreate() { } // TEST-003 & TEST-019 - private HapiSpec nonFungibleTokenCreateHappyPath() { + final HapiSpec nonFungibleTokenCreateHappyPath() { final var createdTokenNum = new AtomicLong(); return propertyPreservingHapiSpec("nonFungibleTokenCreateHappyPath") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -460,7 +460,7 @@ private HapiSpec nonFungibleTokenCreateHappyPath() { } // TEST-005 - private HapiSpec fungibleTokenCreateThenQueryAndTransfer() { + final HapiSpec fungibleTokenCreateThenQueryAndTransfer() { final var createdTokenNum = new AtomicLong(); return propertyPreservingHapiSpec("fungibleTokenCreateThenQueryAndTransfer") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -542,7 +542,7 @@ private HapiSpec fungibleTokenCreateThenQueryAndTransfer() { } // TEST-006 - private HapiSpec nonFungibleTokenCreateThenQuery() { + final HapiSpec nonFungibleTokenCreateThenQuery() { final var createdTokenNum = new AtomicLong(); return propertyPreservingHapiSpec("nonFungibleTokenCreateThenQuery") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -609,7 +609,7 @@ private HapiSpec nonFungibleTokenCreateThenQuery() { .logged())); } - private HapiSpec createTokenWithDefaultExpiryAndEmptyKeys() { + final HapiSpec createTokenWithDefaultExpiryAndEmptyKeys() { final var tokenCreateContractAsKeyDelegate = "createTokenWithDefaultExpiryAndEmptyKeys"; final var createTokenNum = new AtomicLong(); return propertyPreservingHapiSpec("createTokenWithDefaultExpiryAndEmptyKeys") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CryptoTransferHTSSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CryptoTransferHTSSuite.java index 1071a5d9a961..644402453947 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CryptoTransferHTSSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CryptoTransferHTSSuite.java @@ -169,7 +169,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec hapiTransferFromForFungibleToken() { + final HapiSpec hapiTransferFromForFungibleToken() { final var allowance = 10L; final var successfulTransferFromTxn = "txn"; final var successfulTransferFromTxn2 = "txn2"; @@ -352,7 +352,7 @@ private HapiSpec hapiTransferFromForFungibleToken() { } @HapiTest - private HapiSpec hapiTransferFromForFungibleTokenToSystemAccountsFails() { + final HapiSpec hapiTransferFromForFungibleTokenToSystemAccountsFails() { final var UPPER_BOUND_SYSTEM_ADDRESS = 750L; final var ADDRESS_ONE = 1L; final var NON_EXISTING_SYSTEM_ADDRESS = 345L; @@ -453,7 +453,7 @@ private HapiSpec hapiTransferFromForFungibleTokenToSystemAccountsFails() { } @HapiTest - private HapiSpec hapiTransferFromForNFT() { + final HapiSpec hapiTransferFromForNFT() { final var successfulTransferFromTxn = "txn"; final var revertingTransferFromTxn = "revertWhenMoreThanAllowance"; return defaultHapiSpec( @@ -553,7 +553,7 @@ private HapiSpec hapiTransferFromForNFT() { } @HapiTest - private HapiSpec repeatedTokenIdsAreAutomaticallyConsolidated() { + final HapiSpec repeatedTokenIdsAreAutomaticallyConsolidated() { final var repeatedIdsPrecompileXferTxn = "repeatedIdsPrecompileXfer"; final var senderStartBalance = 200L; final var receiverStartBalance = 0L; @@ -633,7 +633,7 @@ private HapiSpec repeatedTokenIdsAreAutomaticallyConsolidated() { } @HapiTest - private HapiSpec nonNestedCryptoTransferForFungibleTokenWithMultipleReceivers() { + final HapiSpec nonNestedCryptoTransferForFungibleTokenWithMultipleReceivers() { final var cryptoTransferTxn = CRYPTO_TRANSFER_TXN; return defaultHapiSpec( @@ -706,7 +706,7 @@ private HapiSpec nonNestedCryptoTransferForFungibleTokenWithMultipleReceivers() } @HapiTest - private HapiSpec nonNestedCryptoTransferForNonFungibleToken() { + final HapiSpec nonNestedCryptoTransferForNonFungibleToken() { final var cryptoTransferTxn = CRYPTO_TRANSFER_TXN; return defaultHapiSpec( @@ -776,7 +776,7 @@ private HapiSpec nonNestedCryptoTransferForNonFungibleToken() { } @HapiTest - private HapiSpec nonNestedCryptoTransferForMultipleNonFungibleTokens() { + final HapiSpec nonNestedCryptoTransferForMultipleNonFungibleTokens() { final var cryptoTransferTxn = CRYPTO_TRANSFER_TXN; return defaultHapiSpec( @@ -863,7 +863,7 @@ private HapiSpec nonNestedCryptoTransferForMultipleNonFungibleTokens() { } @HapiTest - private HapiSpec nonNestedCryptoTransferForFungibleAndNonFungibleToken() { + final HapiSpec nonNestedCryptoTransferForFungibleAndNonFungibleToken() { final var cryptoTransferTxn = CRYPTO_TRANSFER_TXN; return defaultHapiSpec( @@ -970,7 +970,7 @@ private HapiSpec nonNestedCryptoTransferForFungibleAndNonFungibleToken() { } @HapiTest - private HapiSpec nonNestedCryptoTransferForFungibleTokenWithMultipleSendersAndReceiversAndNonFungibleTokens() { + final HapiSpec nonNestedCryptoTransferForFungibleTokenWithMultipleSendersAndReceiversAndNonFungibleTokens() { final var cryptoTransferTxn = CRYPTO_TRANSFER_TXN; return defaultHapiSpec( @@ -1094,7 +1094,7 @@ private HapiSpec nonNestedCryptoTransferForFungibleTokenWithMultipleSendersAndRe } @HapiTest - private HapiSpec hapiTransferFromForNFTWithCustomFeesWithoutApproveFails() { + final HapiSpec hapiTransferFromForNFTWithCustomFeesWithoutApproveFails() { return defaultHapiSpec( "HapiTransferFromForNFTWithCustomFeesWithoutApproveFails", NONDETERMINISTIC_FUNCTION_PARAMETERS, @@ -1241,7 +1241,7 @@ private HapiSpec hapiTransferFromForNFTWithCustomFeesWithoutApproveFails() { } @HapiTest - private HapiSpec hapiTransferFromForFungibleTokenWithCustomFeesWithoutApproveFails() { + final HapiSpec hapiTransferFromForFungibleTokenWithCustomFeesWithoutApproveFails() { final var FUNGIBLE_TOKEN_WITH_FIXED_HBAR_FEE = "fungibleTokenWithFixedHbarFee"; final var FUNGIBLE_TOKEN_WITH_FIXED_TOKEN_FEE = "fungibleTokenWithFixedTokenFee"; final var FUNGIBLE_TOKEN_WITH_FRACTIONAL_FEE = "fungibleTokenWithFractionalTokenFee"; @@ -1341,7 +1341,7 @@ private HapiSpec hapiTransferFromForFungibleTokenWithCustomFeesWithoutApproveFai } @HapiTest - private HapiSpec hapiTransferFromForFungibleTokenWithCustomFeesWithBothApproveForAllAndAssignedSpender() { + final HapiSpec hapiTransferFromForFungibleTokenWithCustomFeesWithBothApproveForAllAndAssignedSpender() { final var FUNGIBLE_TOKEN_WITH_FIXED_HBAR_FEE = "fungibleTokenWithFixedHbarFee"; final var FUNGIBLE_TOKEN_WITH_FIXED_TOKEN_FEE = "fungibleTokenWithFixedTokenFee"; final var FUNGIBLE_TOKEN_WITH_FRACTIONAL_FEE = "fungibleTokenWithFractionalTokenFee"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CryptoTransferHTSV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CryptoTransferHTSV1SecurityModelSuite.java index de0fede67c9f..49a4bd4c883e 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CryptoTransferHTSV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/CryptoTransferHTSV1SecurityModelSuite.java @@ -141,7 +141,7 @@ public List getSpecsInSuite() { hapiTransferFromForNFTWithCustomFeesWithBothApproveForAllAndAssignedSpender()); } - private HapiSpec nonNestedCryptoTransferForFungibleToken() { + final HapiSpec nonNestedCryptoTransferForFungibleToken() { final var cryptoTransferTxn = CRYPTO_TRANSFER_TXN; return propertyPreservingHapiSpec("nonNestedCryptoTransferForFungibleToken") @@ -216,7 +216,7 @@ private HapiSpec nonNestedCryptoTransferForFungibleToken() { .including(FUNGIBLE_TOKEN, RECEIVER, 50)))); } - private HapiSpec activeContractInFrameIsVerifiedWithoutNeedForSignature() { + final HapiSpec activeContractInFrameIsVerifiedWithoutNeedForSignature() { final var revertedFungibleTransferTxn = "revertedFungibleTransferTxn"; final var successfulFungibleTransferTxn = "successfulFungibleTransferTxn"; final var revertedNftTransferTxn = "revertedNftTransferTxn"; @@ -390,7 +390,7 @@ private HapiSpec activeContractInFrameIsVerifiedWithoutNeedForSignature() { .including(NFT_TOKEN, CONTRACT, RECEIVER, 2L)))); } - private HapiSpec cryptoTransferNFTsWithCustomFeesMixedScenario() { + final HapiSpec cryptoTransferNFTsWithCustomFeesMixedScenario() { final var SPENDER_SIGNATURE = "spenderSignature"; return propertyPreservingHapiSpec("cryptoTransferNFTsWithCustomFeesMixedScenario") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -532,7 +532,7 @@ private HapiSpec cryptoTransferNFTsWithCustomFeesMixedScenario() { .then(); } - private HapiSpec hapiTransferFromForNFTWithCustomFeesWithApproveForAll() { + final HapiSpec hapiTransferFromForNFTWithCustomFeesWithApproveForAll() { return propertyPreservingHapiSpec("hapiTransferFromForNFTWithCustomFeesWithApproveForAll") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( @@ -692,7 +692,7 @@ private HapiSpec hapiTransferFromForNFTWithCustomFeesWithApproveForAll() { .then(); } - private HapiSpec hapiTransferFromForNFTWithCustomFeesWithBothApproveForAllAndAssignedSpender() { + final HapiSpec hapiTransferFromForNFTWithCustomFeesWithBothApproveForAllAndAssignedSpender() { return propertyPreservingHapiSpec("hapiTransferFromForNFTWithCustomFeesWithBothApproveForAllAndAssignedSpender") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DefaultTokenStatusSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DefaultTokenStatusSuite.java index fcc53138dca8..fb20dd5838f4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DefaultTokenStatusSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DefaultTokenStatusSuite.java @@ -83,7 +83,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec getTokenDefaultFreezeStatus() { + final HapiSpec getTokenDefaultFreezeStatus() { final AtomicReference vanillaTokenID = new AtomicReference<>(); return defaultHapiSpec("GetTokenDefaultFreezeStatus") @@ -126,7 +126,7 @@ private HapiSpec getTokenDefaultFreezeStatus() { } @HapiTest - private HapiSpec getTokenDefaultKycStatus() { + final HapiSpec getTokenDefaultKycStatus() { final AtomicReference vanillaTokenID = new AtomicReference<>(); return defaultHapiSpec("GetTokenDefaultKycStatus") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DelegatePrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DelegatePrecompileSuite.java index b5916490a55c..33ec4fd9d7fe 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DelegatePrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DelegatePrecompileSuite.java @@ -102,7 +102,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec delegateCallForTransfer() { + final HapiSpec delegateCallForTransfer() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); final AtomicReference receiverID = new AtomicReference<>(); @@ -159,7 +159,7 @@ OUTER_CONTRACT, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec } @HapiTest - private HapiSpec delegateCallForBurn() { + final HapiSpec delegateCallForBurn() { final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); return defaultHapiSpec("delegateCallForBurn") @@ -208,7 +208,7 @@ OUTER_CONTRACT, asHeadlongAddress(getNestedContractAddress(NESTED_CONTRACT, spec } @HapiTest - private HapiSpec delegateCallForMint() { + final HapiSpec delegateCallForMint() { final AtomicReference vanillaTokenTokenID = new AtomicReference<>(); return defaultHapiSpec("delegateCallForMint") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DeleteTokenPrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DeleteTokenPrecompileV1SecurityModelSuite.java index 7b7d95f06384..3133f3826398 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DeleteTokenPrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DeleteTokenPrecompileV1SecurityModelSuite.java @@ -86,7 +86,7 @@ public List getSpecsInSuite() { return List.of(deleteFungibleTokenWithNegativeCases(), deleteNftTokenWithNegativeCases()); } - private HapiSpec deleteFungibleTokenWithNegativeCases() { + final HapiSpec deleteFungibleTokenWithNegativeCases() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final var tokenAlreadyDeletedTxn = "tokenAlreadyDeletedTxn"; @@ -146,7 +146,7 @@ private HapiSpec deleteFungibleTokenWithNegativeCases() { htsPrecompileResult().withStatus(TOKEN_WAS_DELETED))))); } - private HapiSpec deleteNftTokenWithNegativeCases() { + final HapiSpec deleteNftTokenWithNegativeCases() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final var notAnAdminTxn = "notAnAdminTxn"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DissociatePrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DissociatePrecompileV1SecurityModelSuite.java index 94d66d973c1b..0177167401d2 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DissociatePrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/DissociatePrecompileV1SecurityModelSuite.java @@ -274,7 +274,7 @@ public HapiSpec dissociatePrecompileHasExpectedSemanticsForDeletedTokens() { } /* -- Not specifically required in the HTS Precompile Test Plan -- */ - private HapiSpec nestedDissociateWorksAsExpected() { + final HapiSpec nestedDissociateWorksAsExpected() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ERCPrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ERCPrecompileSuite.java index caccecfdea66..9f823432a685 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ERCPrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ERCPrecompileSuite.java @@ -234,7 +234,7 @@ List erc721() { } @HapiTest - private HapiSpec getErc20TokenName() { + final HapiSpec getErc20TokenName() { return defaultHapiSpec("getErc20TokenName") .given( newKeyNamed(MULTI_KEY), @@ -273,7 +273,7 @@ private HapiSpec getErc20TokenName() { } @HapiTest - private HapiSpec getErc20TokenSymbol() { + final HapiSpec getErc20TokenSymbol() { final var tokenSymbol = "F"; final AtomicReference tokenAddr = new AtomicReference<>(); @@ -319,7 +319,7 @@ private HapiSpec getErc20TokenSymbol() { } @HapiTest - private HapiSpec getErc20TokenDecimals() { + final HapiSpec getErc20TokenDecimals() { final var decimals = 10; final var decimalsTxn = "decimalsTxn"; final AtomicReference tokenAddr = new AtomicReference<>(); @@ -368,7 +368,7 @@ private HapiSpec getErc20TokenDecimals() { } @HapiTest - private HapiSpec getErc20TotalSupply() { + final HapiSpec getErc20TotalSupply() { final var totalSupply = 50; final var supplyTxn = "supplyTxn"; final AtomicReference tokenAddr = new AtomicReference<>(); @@ -414,7 +414,7 @@ private HapiSpec getErc20TotalSupply() { } @HapiTest - private HapiSpec getErc20BalanceOfAccount() { + final HapiSpec getErc20BalanceOfAccount() { final var balanceTxn = "balanceTxn"; final var zeroBalanceTxn = "zBalanceTxn"; final AtomicReference tokenAddr = new AtomicReference<>(); @@ -492,7 +492,7 @@ private HapiSpec getErc20BalanceOfAccount() { } @HapiTest - private HapiSpec transferErc20Token() { + final HapiSpec transferErc20Token() { final AtomicReference tokenAddr = new AtomicReference<>(); final AtomicReference accountAddr = new AtomicReference<>(); @@ -579,7 +579,7 @@ private HapiSpec transferErc20Token() { } @HapiTest - private HapiSpec transferErc20TokenFailWithAccount() { + final HapiSpec transferErc20TokenFailWithAccount() { final AtomicReference tokenAddr = new AtomicReference<>(); final AtomicReference accountAddr = new AtomicReference<>(); @@ -624,7 +624,7 @@ private HapiSpec transferErc20TokenFailWithAccount() { } @HapiTest - private HapiSpec transferErc20TokenReceiverContract() { + final HapiSpec transferErc20TokenReceiverContract() { final var nestedContract = NESTED_ERC_20_CONTRACT; return defaultHapiSpec("transferErc20TokenReceiverContract") @@ -697,7 +697,7 @@ private HapiSpec transferErc20TokenReceiverContract() { getAccountBalance(nestedContract).hasTokenBalance(FUNGIBLE_TOKEN, 2)); } - private HapiSpec transferErc20TokenFromContractWithNoApproval() { + final HapiSpec transferErc20TokenFromContractWithNoApproval() { final var transferFromOtherContractWithSignaturesTxn = "transferFromOtherContractWithSignaturesTxn"; final var nestedContract = NESTED_ERC_20_CONTRACT; @@ -766,7 +766,7 @@ private HapiSpec transferErc20TokenFromContractWithNoApproval() { } @HapiTest - private HapiSpec erc20Allowance() { + final HapiSpec erc20Allowance() { return defaultHapiSpec("erc20Allowance") .given( newKeyNamed(MULTI_KEY), @@ -820,7 +820,7 @@ private HapiSpec erc20Allowance() { } @HapiTest - private HapiSpec erc20Approve() { + final HapiSpec erc20Approve() { final var approveTxn = "approveTxn"; return defaultHapiSpec("erc20Approve") @@ -861,7 +861,7 @@ private HapiSpec erc20Approve() { } @HapiTest - private HapiSpec getErc20TokenDecimalsFromErc721TokenFails() { + final HapiSpec getErc20TokenDecimalsFromErc721TokenFails() { final var invalidDecimalsTxn = "decimalsFromErc721Txn"; return defaultHapiSpec("getErc20TokenDecimalsFromErc721TokenFails") @@ -894,7 +894,7 @@ private HapiSpec getErc20TokenDecimalsFromErc721TokenFails() { } @HapiTest - private HapiSpec getErc721TokenName() { + final HapiSpec getErc721TokenName() { return defaultHapiSpec("getErc721TokenName") .given( newKeyNamed(MULTI_KEY), @@ -932,7 +932,7 @@ private HapiSpec getErc721TokenName() { .withName(TOKEN_NAME))))); } - private HapiSpec getErc20TokenNameExceedingLimits() { + final HapiSpec getErc20TokenNameExceedingLimits() { final var REDUCED_NETWORK_FEE = 1L; final var REDUCED_NODE_FEE = 1L; final var REDUCED_SERVICE_FEE = 1L; @@ -989,7 +989,7 @@ private HapiSpec getErc20TokenNameExceedingLimits() { } @HapiTest - private HapiSpec getErc721Symbol() { + final HapiSpec getErc721Symbol() { final var tokenSymbol = "N"; return defaultHapiSpec("getErc721Symbol") @@ -1030,7 +1030,7 @@ private HapiSpec getErc721Symbol() { } @HapiTest - private HapiSpec getErc721TokenURI() { + final HapiSpec getErc721TokenURI() { final var tokenURITxn = "tokenURITxn"; final var nonExistingTokenURITxn = "nonExistingTokenURITxn"; final var ERC721MetadataNonExistingToken = "ERC721Metadata: URI query for nonexistent token"; @@ -1093,7 +1093,7 @@ private HapiSpec getErc721TokenURI() { } @HapiTest - private HapiSpec getErc721TotalSupply() { + final HapiSpec getErc721TotalSupply() { return defaultHapiSpec("getErc721TotalSupply") .given( newKeyNamed(MULTI_KEY), @@ -1131,7 +1131,7 @@ private HapiSpec getErc721TotalSupply() { } @HapiTest - private HapiSpec getErc721BalanceOf() { + final HapiSpec getErc721BalanceOf() { final var zeroBalanceOfTxn = "zbalanceOfTxn"; return defaultHapiSpec("getErc721BalanceOf") @@ -1197,7 +1197,7 @@ private HapiSpec getErc721BalanceOf() { } @HapiTest - private HapiSpec getErc721OwnerOf() { + final HapiSpec getErc721OwnerOf() { final var ownerOfTxn = "ownerOfTxn"; final AtomicReference ownerAddr = new AtomicReference<>(); final AtomicReference tokenAddr = new AtomicReference<>(); @@ -1254,7 +1254,7 @@ ERC_721_CONTRACT, OWNER_OF, asHeadlongAddress(tokenAddr.get()), BigInteger.ONE) } // Expects revert - private HapiSpec getErc721TokenURIFromErc20TokenFails() { + final HapiSpec getErc721TokenURIFromErc20TokenFails() { final var invalidTokenURITxn = "tokenURITxnFromErc20"; return defaultHapiSpec("getErc721TokenURIFromErc20TokenFails") @@ -1286,7 +1286,7 @@ private HapiSpec getErc721TokenURIFromErc20TokenFails() { } @HapiTest - private HapiSpec getErc721OwnerOfFromErc20TokenFails() { + final HapiSpec getErc721OwnerOfFromErc20TokenFails() { final var invalidOwnerOfTxn = "ownerOfTxnFromErc20Token"; return defaultHapiSpec("getErc721OwnerOfFromErc20TokenFails") @@ -1320,7 +1320,7 @@ private HapiSpec getErc721OwnerOfFromErc20TokenFails() { } @HapiTest - private HapiSpec directCallsWorkForErc20() { + final HapiSpec directCallsWorkForErc20() { final AtomicReference tokenNum = new AtomicReference<>(); final var tokenSymbol = "FDFGF"; @@ -1467,7 +1467,7 @@ private HapiSpec directCallsWorkForErc20() { } @HapiTest - private HapiSpec someErc721NegativeTransferFromScenariosPass() { + final HapiSpec someErc721NegativeTransferFromScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference contractMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); @@ -1576,7 +1576,7 @@ private HapiSpec someErc721NegativeTransferFromScenariosPass() { recordWith().status(SPENDER_DOES_NOT_HAVE_ALLOWANCE))); } - private HapiSpec someErc721ApproveAndRemoveScenariosPass() { + final HapiSpec someErc721ApproveAndRemoveScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); final AtomicReference bCivilianMirrorAddr = new AtomicReference<>(); @@ -1772,7 +1772,7 @@ private HapiSpec someErc721ApproveAndRemoveScenariosPass() { } @HapiTest - private HapiSpec someErc20ApproveAllowanceScenariosPass() { + final HapiSpec someErc20ApproveAllowanceScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference contractMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); @@ -1924,7 +1924,7 @@ private HapiSpec someErc20ApproveAllowanceScenariosPass() { } @HapiTest - private HapiSpec someErc20NegativeTransferFromScenariosPass() { + final HapiSpec someErc20NegativeTransferFromScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference contractMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); @@ -2056,7 +2056,7 @@ private HapiSpec someErc20NegativeTransferFromScenariosPass() { } @HapiTest - private HapiSpec someErc20ApproveAllowanceScenarioInOneCall() { + final HapiSpec someErc20ApproveAllowanceScenarioInOneCall() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference contractMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); @@ -2111,7 +2111,7 @@ private HapiSpec someErc20ApproveAllowanceScenarioInOneCall() { } @HapiTest - private HapiSpec directCallsWorkForErc721() { + final HapiSpec directCallsWorkForErc721() { final AtomicReference tokenNum = new AtomicReference<>(); @@ -2251,7 +2251,7 @@ private HapiSpec directCallsWorkForErc721() { } @HapiTest - private HapiSpec someErc721GetApprovedScenariosPass() { + final HapiSpec someErc721GetApprovedScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); final AtomicReference zCivilianMirrorAddr = new AtomicReference<>(); @@ -2360,7 +2360,7 @@ private HapiSpec someErc721GetApprovedScenariosPass() { } @HapiTest - private HapiSpec someErc721BalanceOfScenariosPass() { + final HapiSpec someErc721BalanceOfScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); final AtomicReference bCivilianMirrorAddr = new AtomicReference<>(); @@ -2440,7 +2440,7 @@ private HapiSpec someErc721BalanceOfScenariosPass() { } @HapiTest - private HapiSpec someErc721OwnerOfScenariosPass() { + final HapiSpec someErc721OwnerOfScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); final AtomicReference zCivilianMirrorAddr = new AtomicReference<>(); @@ -2533,7 +2533,7 @@ private HapiSpec someErc721OwnerOfScenariosPass() { } @HapiTest - private HapiSpec someErc721IsApprovedForAllScenariosPass() { + final HapiSpec someErc721IsApprovedForAllScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference contractMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); @@ -2660,7 +2660,7 @@ private HapiSpec someErc721IsApprovedForAllScenariosPass() { } @HapiTest - private HapiSpec someErc721SetApprovedForAllScenariosPass() { + final HapiSpec someErc721SetApprovedForAllScenariosPass() { final AtomicReference tokenMirrorAddr = new AtomicReference<>(); final AtomicReference contractMirrorAddr = new AtomicReference<>(); final AtomicReference aCivilianMirrorAddr = new AtomicReference<>(); @@ -2789,7 +2789,7 @@ OPERATOR_DOES_NOT_EXISTS, SUCCESS, recordWith().status(INVALID_ALLOWANCE_SPENDER } @HapiTest - private HapiSpec getErc721IsApprovedForAll() { + final HapiSpec getErc721IsApprovedForAll() { final var notApprovedTxn = "notApprovedTxn"; final var approvedForAllTxn = "approvedForAllTxn"; @@ -2877,7 +2877,7 @@ private HapiSpec getErc721IsApprovedForAll() { } @HapiTest - private HapiSpec erc721TokenApprove() { + final HapiSpec erc721TokenApprove() { return defaultHapiSpec("erc721TokenApprove") .given( newKeyNamed(MULTI_KEY), @@ -2915,7 +2915,7 @@ private HapiSpec erc721TokenApprove() { } @HapiTest - private HapiSpec erc721GetApproved() { + final HapiSpec erc721GetApproved() { final var theSpender2 = "spender2"; return defaultHapiSpec("erc721GetApproved") @@ -2973,7 +2973,7 @@ private HapiSpec erc721GetApproved() { } @HapiTest - private HapiSpec erc20TransferFromAllowance() { + final HapiSpec erc20TransferFromAllowance() { final var allowanceTxn2 = "allowanceTxn2"; return defaultHapiSpec("erc20TransferFromAllowance") @@ -3070,7 +3070,7 @@ private HapiSpec erc20TransferFromAllowance() { } @HapiTest - private HapiSpec erc20TransferFromSelf() { + final HapiSpec erc20TransferFromSelf() { return defaultHapiSpec("erc20TransferFromSelf") .given( newKeyNamed(MULTI_KEY), @@ -3116,7 +3116,7 @@ private HapiSpec erc20TransferFromSelf() { } @HapiTest - private HapiSpec erc721TransferFromWithApproval() { + final HapiSpec erc721TransferFromWithApproval() { return defaultHapiSpec("erc721TransferFromWithApproval") .given( newKeyNamed(MULTI_KEY), @@ -3195,7 +3195,7 @@ private HapiSpec erc721TransferFromWithApproval() { } @HapiTest - private HapiSpec erc721TransferFromWithApproveForAll() { + final HapiSpec erc721TransferFromWithApproveForAll() { return defaultHapiSpec("erc721TransferFromWithApproveForAll") .given( newKeyNamed(MULTI_KEY), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ERCPrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ERCPrecompileV1SecurityModelSuite.java index bafe3b601ca8..dcd6254db3e8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ERCPrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/ERCPrecompileV1SecurityModelSuite.java @@ -85,7 +85,7 @@ List erc721() { return List.of(); } - private HapiSpec transferErc20TokenAliasedSender() { + final HapiSpec transferErc20TokenAliasedSender() { final var aliasedTransferTxn = "aliasedTransferTxn"; final var addLiquidityTxn = "addLiquidityTxn"; final var create2Txn = "create2Txn"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/FreezeUnfreezeTokenPrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/FreezeUnfreezeTokenPrecompileSuite.java index ab1a11a818fb..744c38fd9a7b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/FreezeUnfreezeTokenPrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/FreezeUnfreezeTokenPrecompileSuite.java @@ -90,7 +90,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec noTokenIdReverts() { + final HapiSpec noTokenIdReverts() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference accountID = new AtomicReference<>(); return defaultHapiSpec("noTokenIdReverts") @@ -141,7 +141,7 @@ private HapiSpec noTokenIdReverts() { } @HapiTest - private HapiSpec isFrozenHappyPathWithAliasLocalCall() { + final HapiSpec isFrozenHappyPathWithAliasLocalCall() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference autoCreatedAccountId = new AtomicReference<>(); final String accountAlias = "accountAlias"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/FreezeUnfreezeTokenPrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/FreezeUnfreezeTokenPrecompileV1SecurityModelSuite.java index fe55470f681d..6e05e10e636f 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/FreezeUnfreezeTokenPrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/FreezeUnfreezeTokenPrecompileV1SecurityModelSuite.java @@ -108,7 +108,7 @@ public List getSpecsInSuite() { isFrozenHappyPathWithLocalCall()); } - private HapiSpec freezeUnfreezeFungibleWithNegativeCases() { + final HapiSpec freezeUnfreezeFungibleWithNegativeCases() { final AtomicReference withoutKeyID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference accountID = new AtomicReference<>(); @@ -222,7 +222,7 @@ private HapiSpec freezeUnfreezeFungibleWithNegativeCases() { htsPrecompileResult().withStatus(TOKEN_HAS_NO_FREEZE_KEY))))); } - private HapiSpec freezeUnfreezeNftsWithNegativeCases() { + final HapiSpec freezeUnfreezeNftsWithNegativeCases() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference accountID = new AtomicReference<>(); return propertyPreservingHapiSpec("freezeUnfreezeNftsWithNegativeCases") @@ -312,7 +312,7 @@ private HapiSpec freezeUnfreezeNftsWithNegativeCases() { .withIsFrozen(false))))); } - private HapiSpec isFrozenHappyPathWithLocalCall() { + final HapiSpec isFrozenHappyPathWithLocalCall() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); return propertyPreservingHapiSpec("isFrozenHappyPathWithLocalCall") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/GrantRevokeKycSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/GrantRevokeKycSuite.java index dd9441adafb1..96d8c148cccd 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/GrantRevokeKycSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/GrantRevokeKycSuite.java @@ -103,7 +103,7 @@ List positiveSpecs() { } @HapiTest - private HapiSpec grantRevokeKycFail() { + final HapiSpec grantRevokeKycFail() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference accountID = new AtomicReference<>(); final AtomicReference secondAccountID = new AtomicReference<>(); @@ -272,7 +272,7 @@ private HapiSpec grantRevokeKycFail() { } @HapiTest - private HapiSpec grantRevokeKycSpecWithAliasLocalCall() { + final HapiSpec grantRevokeKycSpecWithAliasLocalCall() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference autoCreatedAccountId = new AtomicReference<>(); final String accountAlias = "accountAlias"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/GrantRevokeKycV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/GrantRevokeKycV1SecurityModelSuite.java index d44e63c4e966..2b12edc9130d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/GrantRevokeKycV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/GrantRevokeKycV1SecurityModelSuite.java @@ -95,7 +95,7 @@ List positiveSpecs() { return List.of(grantRevokeKycSpec()); } - private HapiSpec grantRevokeKycSpec() { + final HapiSpec grantRevokeKycSpec() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference accountID = new AtomicReference<>(); final AtomicReference secondAccountID = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/HRCPrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/HRCPrecompileSuite.java index b690af460d10..ba2a0366d386 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/HRCPrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/HRCPrecompileSuite.java @@ -102,7 +102,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec hrcNftAndFungibleTokenAssociateFromEOA() { + final HapiSpec hrcNftAndFungibleTokenAssociateFromEOA() { final AtomicReference fungibleTokenNum = new AtomicReference<>(); final AtomicReference nonfungibleTokenNum = new AtomicReference<>(); @@ -214,7 +214,7 @@ private HapiSpec hrcNftAndFungibleTokenAssociateFromEOA() { } @HapiTest - private HapiSpec hrcNFTAndFungibleTokenAssociateFromContract() { + final HapiSpec hrcNFTAndFungibleTokenAssociateFromContract() { return defaultHapiSpec("hrcNFTAndFungibleTokenAssociateFromContract") .given( newKeyNamed(MULTI_KEY), @@ -321,7 +321,7 @@ private HapiSpec hrcNFTAndFungibleTokenAssociateFromContract() { } @HapiTest - private HapiSpec hrcTokenAssociateFromSameEOATwiceShouldFail() { + final HapiSpec hrcTokenAssociateFromSameEOATwiceShouldFail() { final AtomicReference fungibleTokenNum = new AtomicReference<>(); return defaultHapiSpec("hrcTokenAssociateFromSameEOATwiceShouldFail") @@ -387,7 +387,7 @@ private HapiSpec hrcTokenAssociateFromSameEOATwiceShouldFail() { } @HapiTest - private HapiSpec hrcTokenDissociateWhenNotAssociatedShouldFail() { + final HapiSpec hrcTokenDissociateWhenNotAssociatedShouldFail() { final AtomicReference fungibleTokenNum = new AtomicReference<>(); return defaultHapiSpec("hrcTokenDissociateWhenNotAssociatedShouldFail") @@ -435,7 +435,7 @@ private HapiSpec hrcTokenDissociateWhenNotAssociatedShouldFail() { } @HapiTest - private HapiSpec hrcTokenDissociateWhenBalanceNotZeroShouldFail() { + final HapiSpec hrcTokenDissociateWhenBalanceNotZeroShouldFail() { final AtomicReference fungibleTokenNum = new AtomicReference<>(); return defaultHapiSpec("hrcTokenDissociateWhenBalanceNotZeroShouldFail") @@ -503,7 +503,7 @@ private HapiSpec hrcTokenDissociateWhenBalanceNotZeroShouldFail() { } @HapiTest - private HapiSpec hrcTooManyTokenAssociateShouldFail() { + final HapiSpec hrcTooManyTokenAssociateShouldFail() { final AtomicReference fungibleTokenNum1 = new AtomicReference<>(); final AtomicReference fungibleTokenNum2 = new AtomicReference<>(); final AtomicReference fungibleTokenNum3 = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/LazyCreateThroughPrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/LazyCreateThroughPrecompileSuite.java index 524e6c36928d..3c72f3c43a17 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/LazyCreateThroughPrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/LazyCreateThroughPrecompileSuite.java @@ -262,7 +262,7 @@ HapiSpec autoCreationFailsWithMirrorAddress() { } @HapiTest - private HapiSpec erc20TransferLazyCreate() { + final HapiSpec erc20TransferLazyCreate() { final AtomicReference tokenAddr = new AtomicReference<>(); return defaultHapiSpec("erc20TransferLazyCreate") @@ -333,7 +333,7 @@ private HapiSpec erc20TransferLazyCreate() { // Expected INSUFFICIENT_GAS but was REVERTED_SUCCESS @HapiTest - public HapiSpec erc20TransferFromLazyCreate() { + final HapiSpec erc20TransferFromLazyCreate() { return defaultHapiSpec("erc20TransferFromLazyCreate") .given( newKeyNamed(MULTI_KEY), @@ -436,7 +436,7 @@ public HapiSpec erc20TransferFromLazyCreate() { } @HapiTest - private HapiSpec erc721TransferFromLazyCreate() { + final HapiSpec erc721TransferFromLazyCreate() { return defaultHapiSpec("erc721TransferFromLazyCreate") .given( newKeyNamed(ECDSA_KEY).shape(SECP_256K1_SHAPE), @@ -519,7 +519,7 @@ private HapiSpec erc721TransferFromLazyCreate() { } @HapiTest - private HapiSpec htsTransferFromFungibleTokenLazyCreate() { + final HapiSpec htsTransferFromFungibleTokenLazyCreate() { final var allowance = 10L; final var successfulTransferFromTxn = "txn"; return defaultHapiSpec("htsTransferFromFungibleTokenLazyCreate") @@ -592,7 +592,7 @@ private HapiSpec htsTransferFromFungibleTokenLazyCreate() { } @HapiTest - private HapiSpec htsTransferFromForNFTLazyCreate() { + final HapiSpec htsTransferFromForNFTLazyCreate() { return defaultHapiSpec("htsTransferFromForNFTLazyCreate") .given( newKeyNamed(ECDSA_KEY).shape(SECP_256K1_SHAPE), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/LazyCreateThroughPrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/LazyCreateThroughPrecompileV1SecurityModelSuite.java index ae53b351c39e..510ab2ea7d5e 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/LazyCreateThroughPrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/LazyCreateThroughPrecompileV1SecurityModelSuite.java @@ -380,7 +380,7 @@ HapiSpec canCreateMultipleHollows() { .then(getTxnRecord(creationAttempt).andAllChildRecords().logged()); } - private HapiSpec cryptoTransferV1LazyCreate() { + final HapiSpec cryptoTransferV1LazyCreate() { final var NESTED_LAZY_PRECOMPILE_CONTRACT = "LazyPrecompileTransfers"; final var FUNGIBLE_TOKEN_2 = "ftnt"; return propertyPreservingHapiSpec("cryptoTransferV1LazyCreate") @@ -565,7 +565,7 @@ private HapiSpec cryptoTransferV1LazyCreate() { .then(); } - private HapiSpec cryptoTransferV2LazyCreate() { + final HapiSpec cryptoTransferV2LazyCreate() { final var NESTED_LAZY_PRECOMPILE_CONTRACT = "LazyPrecompileTransfersAtomic"; final var FUNGIBLE_TOKEN_2 = "ftnt"; final var INIT_BALANCE = 10 * ONE_HUNDRED_HBARS; @@ -739,7 +739,7 @@ private HapiSpec cryptoTransferV2LazyCreate() { .then(); } - private HapiSpec transferTokenLazyCreate() { + final HapiSpec transferTokenLazyCreate() { final AtomicReference tokenAddr = new AtomicReference<>(); return propertyPreservingHapiSpec("transferTokenLazyCreate") @@ -802,7 +802,7 @@ private HapiSpec transferTokenLazyCreate() { .then(); } - private HapiSpec transferTokensToEVMAddressAliasRevertAndTransferAgainSuccessfully() { + final HapiSpec transferTokensToEVMAddressAliasRevertAndTransferAgainSuccessfully() { final AtomicReference tokenAddr = new AtomicReference<>(); return propertyPreservingHapiSpec("transferTokensToEVMAddressAliasRevertAndTransferAgainSuccessfully") @@ -868,7 +868,7 @@ private HapiSpec transferTokensToEVMAddressAliasRevertAndTransferAgainSuccessful .then(); } - private HapiSpec transferNftLazyCreate() { + final HapiSpec transferNftLazyCreate() { return propertyPreservingHapiSpec("transferNftLazyCreate") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( @@ -931,7 +931,7 @@ private HapiSpec transferNftLazyCreate() { .then(); } - private HapiSpec transferNftsLazyCreate() { + final HapiSpec transferNftsLazyCreate() { return propertyPreservingHapiSpec("transferNftsLazyCreate") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( @@ -996,7 +996,7 @@ private HapiSpec transferNftsLazyCreate() { .then(); } - private HapiSpec htsTransferFromFungibleTokenLazyCreate() { + final HapiSpec htsTransferFromFungibleTokenLazyCreate() { final var allowance = 10L; final var successfulTransferFromTxn = "txn"; return propertyPreservingHapiSpec("htsTransferFromFungibleTokenLazyCreate") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/MixedHTSPrecompileTestsV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/MixedHTSPrecompileTestsV1SecurityModelSuite.java index eabb1aabcaef..6f131dacd356 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/MixedHTSPrecompileTestsV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/MixedHTSPrecompileTestsV1SecurityModelSuite.java @@ -89,7 +89,7 @@ public List getSpecsInSuite() { createTokenWithFixedFeeThenTransferAndAssessFee()); } - private HapiSpec hscsPrec021TryCatchConstructOnlyRollsBackTheFailedPrecompile() { + final HapiSpec hscsPrec021TryCatchConstructOnlyRollsBackTheFailedPrecompile() { final var theAccount = "anybody"; final var token = "Token"; final var outerContract = "AssociateTryCatch"; @@ -139,7 +139,7 @@ private HapiSpec hscsPrec021TryCatchConstructOnlyRollsBackTheFailedPrecompile() .hasKnownStatus(SUCCESS)); } - private HapiSpec createTokenWithFixedFeeThenTransferAndAssessFee() { + final HapiSpec createTokenWithFixedFeeThenTransferAndAssessFee() { final var createTokenNum = new AtomicLong(); final var CONTRACT_ADMIN_KEY = "contractAdminKey"; final var FEE_COLLECTOR = "feeCollector"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/PauseUnpauseTokenAccountPrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/PauseUnpauseTokenAccountPrecompileSuite.java index ffc2b8ded9d2..d07531613934 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/PauseUnpauseTokenAccountPrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/PauseUnpauseTokenAccountPrecompileSuite.java @@ -90,7 +90,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec noTokenIdReverts() { + final HapiSpec noTokenIdReverts() { final AtomicReference vanillaTokenID = new AtomicReference<>(); return defaultHapiSpec("noTokenIdReverts") .given( @@ -134,7 +134,7 @@ PAUSE_TX, CONTRACT_REVERT_EXECUTED, recordWith().status(INVALID_TOKEN_ID)), } @HapiTest - private HapiSpec noAccountKeyReverts() { + final HapiSpec noAccountKeyReverts() { final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); return defaultHapiSpec("noAccountKeyReverts") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/PrngPrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/PrngPrecompileSuite.java index 9c0ad2aaf409..f2803ff04b7d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/PrngPrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/PrngPrecompileSuite.java @@ -91,7 +91,7 @@ List positiveSpecs() { return List.of(prngPrecompileHappyPathWorks(), multipleCallsHaveIndependentResults()); } - private HapiSpec multipleCallsHaveIndependentResults() { + final HapiSpec multipleCallsHaveIndependentResults() { final var prng = THE_PRNG_CONTRACT; final var gasToOffer = 400_000; final var numCalls = 5; @@ -136,7 +136,7 @@ private HapiSpec multipleCallsHaveIndependentResults() { } @HapiTest - private HapiSpec emptyInputCallFails() { + final HapiSpec emptyInputCallFails() { final var prng = THE_PRNG_CONTRACT; final var emptyInputCall = "emptyInputCall"; return defaultHapiSpec("emptyInputCallFails") @@ -164,7 +164,7 @@ private HapiSpec emptyInputCallFails() { } @HapiTest - private HapiSpec invalidLargeInputFails() { + final HapiSpec invalidLargeInputFails() { final var prng = THE_PRNG_CONTRACT; final var largeInputCall = "largeInputCall"; return defaultHapiSpec("invalidLargeInputFails") @@ -191,7 +191,7 @@ private HapiSpec invalidLargeInputFails() { })); } - private HapiSpec nonSupportedAbiCallGracefullyFails() { + final HapiSpec nonSupportedAbiCallGracefullyFails() { final var prng = THE_GRACEFULLY_FAILING_PRNG_CONTRACT; final var failedCall = "failedCall"; return defaultHapiSpec("nonSupportedAbiCallGracefullyFails") @@ -213,7 +213,7 @@ private HapiSpec nonSupportedAbiCallGracefullyFails() { })); } - private HapiSpec functionCallWithLessThanFourBytesFailsGracefully() { + final HapiSpec functionCallWithLessThanFourBytesFailsGracefully() { final var lessThan4Bytes = "lessThan4Bytes"; return defaultHapiSpec("functionCallWithLessThanFourBytesFailsGracefully") .given(cryptoCreate(BOB), uploadInitCode(THE_PRNG_CONTRACT), contractCreate(THE_PRNG_CONTRACT)) @@ -240,7 +240,7 @@ private HapiSpec functionCallWithLessThanFourBytesFailsGracefully() { })); } - private HapiSpec prngPrecompileHappyPathWorks() { + final HapiSpec prngPrecompileHappyPathWorks() { final var prng = THE_PRNG_CONTRACT; final var randomBits = "randomBits"; return defaultHapiSpec("prngPrecompileHappyPathWorks") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/RedirectPrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/RedirectPrecompileSuite.java index 56f70682cf60..34f307ee7d30 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/RedirectPrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/RedirectPrecompileSuite.java @@ -69,7 +69,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec balanceOf() { + final HapiSpec balanceOf() { final var totalSupply = 50; return defaultHapiSpec("balanceOf") .given( @@ -110,7 +110,7 @@ private HapiSpec balanceOf() { } @HapiTest - private HapiSpec redirectToInvalidToken() { + final HapiSpec redirectToInvalidToken() { return defaultHapiSpec("redirectToInvalidToken") .given( newKeyNamed(MULTI_KEY), @@ -144,7 +144,7 @@ private HapiSpec redirectToInvalidToken() { } @HapiTest - private HapiSpec redirectToNullSelector() { + final HapiSpec redirectToNullSelector() { return defaultHapiSpec("redirectToNullSelector") .given( newKeyNamed(MULTI_KEY), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/SigningReqsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/SigningReqsSuite.java index 1ede9f6f2e02..58d2bac204b8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/SigningReqsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/SigningReqsSuite.java @@ -73,7 +73,7 @@ public List getSpecsInSuite() { return List.of(autoRenewAccountCanUseLegacySigActivationIfConfigured()); } - private HapiSpec autoRenewAccountCanUseLegacySigActivationIfConfigured() { + final HapiSpec autoRenewAccountCanUseLegacySigActivationIfConfigured() { final var autoRenew = AUTO_RENEW; final AtomicReference
autoRenewMirrorAddr = new AtomicReference<>(); final AtomicLong contractId = new AtomicLong(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/SigningReqsV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/SigningReqsV1SecurityModelSuite.java index a1597f1609d9..c5116ff08e31 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/SigningReqsV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/SigningReqsV1SecurityModelSuite.java @@ -90,7 +90,7 @@ public List getSpecsInSuite() { } @SuppressWarnings("java:S5960") // "assertions should not be used in production code" - not production - private HapiSpec selfDenominatedFixedCollectorMustSign() { + final HapiSpec selfDenominatedFixedCollectorMustSign() { final var fcKey = "fcKey"; final var arKey = AR_KEY; final var feeCollector = "feeCollector"; @@ -163,7 +163,7 @@ private HapiSpec selfDenominatedFixedCollectorMustSign() { } @SuppressWarnings("java:S5960") // "assertions should not be used in production code" - not production - private HapiSpec fractionalFeeCollectorMustSign() { + final HapiSpec fractionalFeeCollectorMustSign() { final var fcKey = "fcKey"; final var arKey = AR_KEY; final var feeCollector = "feeCollector"; @@ -232,7 +232,7 @@ private HapiSpec fractionalFeeCollectorMustSign() { }))); } - private HapiSpec autoRenewAccountMustSignCreation() { + final HapiSpec autoRenewAccountMustSignCreation() { final var arKey = AR_KEY; final var autoRenew = AUTO_RENEW; final AtomicReference
autoRenewAlias = new AtomicReference<>(); @@ -292,7 +292,7 @@ private HapiSpec autoRenewAccountMustSignCreation() { getTokenInfo(asTokenString(createdToken.get())).hasAutoRenewAccount(autoRenew))); } - private HapiSpec newTreasuryAccountMustSignUpdate() { + final HapiSpec newTreasuryAccountMustSignUpdate() { final var ft = "fungibleToken"; final var ntKey = "ntKey"; final var updateTxn = "updateTxn"; @@ -346,7 +346,7 @@ private HapiSpec newTreasuryAccountMustSignUpdate() { getTokenInfo(ft).hasTreasury(TOKEN_TREASURY)); } - private HapiSpec newAutoRenewAccountMustSignUpdate() { + final HapiSpec newAutoRenewAccountMustSignUpdate() { final var ft = "fungibleToken"; final var narKey = "narKey"; final var adminKey = "adminKey"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenAndTypeCheckSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenAndTypeCheckSuite.java index d15c79496c1b..325cc13b6920 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenAndTypeCheckSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenAndTypeCheckSuite.java @@ -85,7 +85,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec checkTokenAndTypeStandardCases() { + final HapiSpec checkTokenAndTypeStandardCases() { final AtomicReference vanillaTokenID = new AtomicReference<>(); return defaultHapiSpec("checkTokenAndTypeStandardCases") @@ -127,7 +127,7 @@ private HapiSpec checkTokenAndTypeStandardCases() { // Should just return false on isToken() check for missing token type @HapiTest - private HapiSpec checkTokenAndTypeNegativeCases() { + final HapiSpec checkTokenAndTypeNegativeCases() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final var notAnAddress = new byte[20]; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenExpiryInfoSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenExpiryInfoSuite.java index c6f4e710ac3d..37fe7451e328 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenExpiryInfoSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenExpiryInfoSuite.java @@ -85,7 +85,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec getExpiryInfoForToken() { + final HapiSpec getExpiryInfoForToken() { final AtomicReference vanillaTokenID = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenExpiryInfoV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenExpiryInfoV1SecurityModelSuite.java index 8e8b9a6a8134..dd8b1c2aa459 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenExpiryInfoV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenExpiryInfoV1SecurityModelSuite.java @@ -99,7 +99,7 @@ public List getSpecsInSuite() { @SuppressWarnings({"java:S5960", "java:S1192" }) // using `assertThat` in production code - except this isn't production code - private HapiSpec updateExpiryInfoForToken() { + final HapiSpec updateExpiryInfoForToken() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference updatedAutoRenewAccountID = new AtomicReference<>(); @@ -251,7 +251,7 @@ private HapiSpec updateExpiryInfoForToken() { } @SuppressWarnings("java:S1192") // "use already defined const instead of copying its value here" - not this time - private HapiSpec updateExpiryInfoForTokenAndReadLatestInfo() { + final HapiSpec updateExpiryInfoForTokenAndReadLatestInfo() { final AtomicReference vanillaTokenID = new AtomicReference<>(); final AtomicReference updatedAutoRenewAccountID = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenInfoHTSSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenInfoHTSSuite.java index 0c5d2677871e..fdc825ebf4a2 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenInfoHTSSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenInfoHTSSuite.java @@ -160,7 +160,7 @@ List positiveSpecs() { } @HapiTest - private HapiSpec happyPathGetTokenInfo() { + final HapiSpec happyPathGetTokenInfo() { final AtomicReference targetLedgerId = new AtomicReference<>(); return defaultHapiSpec("HappyPathGetTokenInfo") .given( @@ -254,7 +254,7 @@ private HapiSpec happyPathGetTokenInfo() { } @HapiTest - private HapiSpec happyPathGetFungibleTokenInfo() { + final HapiSpec happyPathGetFungibleTokenInfo() { final int decimals = 1; final AtomicReference targetLedgerId = new AtomicReference<>(); return defaultHapiSpec("HappyPathGetFungibleTokenInfo") @@ -349,7 +349,7 @@ private HapiSpec happyPathGetFungibleTokenInfo() { } @HapiTest - private HapiSpec happyPathGetNonFungibleTokenInfo() { + final HapiSpec happyPathGetNonFungibleTokenInfo() { final int maxSupply = 10; final ByteString meta = ByteString.copyFrom(META.getBytes(StandardCharsets.UTF_8)); final AtomicReference targetLedgerId = new AtomicReference<>(); @@ -461,7 +461,7 @@ private HapiSpec happyPathGetNonFungibleTokenInfo() { } @HapiTest - private HapiSpec getInfoOnDeletedFungibleTokenWorks() { + final HapiSpec getInfoOnDeletedFungibleTokenWorks() { return defaultHapiSpec("getInfoOnDeletedFungibleTokenWorks") .given( cryptoCreate(TOKEN_TREASURY).balance(0L), @@ -507,7 +507,7 @@ private HapiSpec getInfoOnDeletedFungibleTokenWorks() { } @HapiTest - private HapiSpec getInfoOnInvalidFungibleTokenFails() { + final HapiSpec getInfoOnInvalidFungibleTokenFails() { return defaultHapiSpec("getInfoOnInvalidFungibleTokenFails") .given( cryptoCreate(TOKEN_TREASURY).balance(0L), @@ -550,7 +550,7 @@ private HapiSpec getInfoOnInvalidFungibleTokenFails() { } @HapiTest - private HapiSpec getInfoOnDeletedNonFungibleTokenFails() { + final HapiSpec getInfoOnDeletedNonFungibleTokenFails() { final ByteString meta = ByteString.copyFrom(META.getBytes(StandardCharsets.UTF_8)); return defaultHapiSpec("getInfoOnDeletedNonFungibleTokenFails") .given( @@ -593,7 +593,7 @@ private HapiSpec getInfoOnDeletedNonFungibleTokenFails() { } @HapiTest - private HapiSpec getInfoOnInvalidNonFungibleTokenFails() { + final HapiSpec getInfoOnInvalidNonFungibleTokenFails() { final ByteString meta = ByteString.copyFrom(META.getBytes(StandardCharsets.UTF_8)); return defaultHapiSpec("getInfoOnInvalidNonFungibleTokenFails") .given( @@ -647,7 +647,7 @@ private HapiSpec getInfoOnInvalidNonFungibleTokenFails() { } @HapiTest - private HapiSpec happyPathGetTokenCustomFees() { + final HapiSpec happyPathGetTokenCustomFees() { return defaultHapiSpec("HappyPathGetTokenCustomFees") .given( cryptoCreate(TOKEN_TREASURY).balance(0L), @@ -703,7 +703,7 @@ private HapiSpec happyPathGetTokenCustomFees() { } @HapiTest - private HapiSpec happyPathGetNonFungibleTokenCustomFees() { + final HapiSpec happyPathGetNonFungibleTokenCustomFees() { final int maxSupply = 10; final ByteString meta = ByteString.copyFrom(META.getBytes(StandardCharsets.UTF_8)); return defaultHapiSpec("HappyPathGetNonFungibleTokenCustomFees") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenInfoHTSV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenInfoHTSV1SecurityModelSuite.java index ef457dcad4f5..b3c1721754a8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenInfoHTSV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenInfoHTSV1SecurityModelSuite.java @@ -158,7 +158,7 @@ List positiveSpecs() { happyPathUpdateTokenKeysAndReadLatestInformation()); } - private HapiSpec happyPathUpdateTokenInfoAndGetLatestInfo() { + final HapiSpec happyPathUpdateTokenInfoAndGetLatestInfo() { final int decimals = 1; final AtomicReference targetLedgerId = new AtomicReference<>(); return propertyPreservingHapiSpec("happyPathUpdateTokenInfoAndGetLatestInfo") @@ -269,7 +269,7 @@ private HapiSpec happyPathUpdateTokenInfoAndGetLatestInfo() { })); } - private HapiSpec happyPathUpdateFungibleTokenInfoAndGetLatestInfo() { + final HapiSpec happyPathUpdateFungibleTokenInfoAndGetLatestInfo() { final int decimals = 1; final AtomicReference targetLedgerId = new AtomicReference<>(); return propertyPreservingHapiSpec("happyPathUpdateFungibleTokenInfoAndGetLatestInfo") @@ -377,7 +377,7 @@ private HapiSpec happyPathUpdateFungibleTokenInfoAndGetLatestInfo() { })); } - private HapiSpec happyPathUpdateNonFungibleTokenInfoAndGetLatestInfo() { + final HapiSpec happyPathUpdateNonFungibleTokenInfoAndGetLatestInfo() { final int maxSupply = 10; final ByteString meta = ByteString.copyFrom(META.getBytes(StandardCharsets.UTF_8)); final AtomicReference targetLedgerId = new AtomicReference<>(); @@ -498,7 +498,7 @@ private HapiSpec happyPathUpdateNonFungibleTokenInfoAndGetLatestInfo() { })); } - private HapiSpec happyPathUpdateTokenKeysAndReadLatestInformation() { + final HapiSpec happyPathUpdateTokenKeysAndReadLatestInformation() { final String TOKEN_INFO_AS_KEY = "TOKEN_INFO_CONTRACT_KEY"; return propertyPreservingHapiSpec("happyPathUpdateTokenKeysAndReadLatestInformation") .preserving(CONTRACTS_ALLOW_SYSTEM_USE_OF_HAPI_SIGS, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenUpdatePrecompileSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenUpdatePrecompileSuite.java index 9c82a7d01985..5daba3391031 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenUpdatePrecompileSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenUpdatePrecompileSuite.java @@ -121,7 +121,7 @@ List negativeCases() { } @HapiTest - private HapiSpec updateTokenWithInvalidKeyValues() { + final HapiSpec updateTokenWithInvalidKeyValues() { final AtomicReference vanillaTokenID = new AtomicReference<>(); return defaultHapiSpec("updateTokenWithInvalidKeyValues") .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenUpdatePrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenUpdatePrecompileV1SecurityModelSuite.java index 9b9feb7c2218..49cf7a461247 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenUpdatePrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TokenUpdatePrecompileV1SecurityModelSuite.java @@ -153,7 +153,7 @@ List negativeCases() { return List.of(updateWithTooLongNameAndSymbol(), updateTokenWithKeysNegative()); } - private HapiSpec updateTokenWithKeysHappyPath() { + final HapiSpec updateTokenWithKeysHappyPath() { final AtomicReference vanillaTokenID = new AtomicReference<>(); return propertyPreservingHapiSpec("updateTokenWithKeysHappyPath") .preserving(CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -407,7 +407,7 @@ public HapiSpec updateWithTooLongNameAndSymbol() { TransactionRecordAsserts.recordWith().status(TOKEN_SYMBOL_TOO_LONG))))); } - private HapiSpec updateTokenWithKeysNegative() { + final HapiSpec updateTokenWithKeysNegative() { final var updateTokenWithKeysFunc = "updateTokenWithKeys"; final var NO_FEE_SCHEDULE_KEY_TXN = "NO_FEE_SCHEDULE_KEY_TXN"; final var NO_PAUSE_KEY_TXN = "NO_PAUSE_KEY_TXN"; @@ -645,7 +645,7 @@ private HapiSpec updateTokenWithKeysNegative() { TransactionRecordAsserts.recordWith().status(TOKEN_HAS_NO_KYC_KEY))))); } - private HapiSpec updateOnlyTokenKeysAndGetTheUpdatedValues() { + final HapiSpec updateOnlyTokenKeysAndGetTheUpdatedValues() { final AtomicReference vanillaTokenID = new AtomicReference<>(); return propertyPreservingHapiSpec("updateOnlyTokenKeysAndGetTheUpdatedValues") @@ -908,7 +908,7 @@ public HapiSpec updateOnlyKeysForNonFungibleToken() { .hasPauseKey(TOKEN_UPDATE_AS_KEY)))); } - private HapiSpec updateTokenWithoutNameSymbolMemo() { + final HapiSpec updateTokenWithoutNameSymbolMemo() { final var updateTokenWithoutNameSymbolMemoFunc = "updateTokenWithoutNameSymbolMemo"; final AtomicReference vanillaTokenID = new AtomicReference<>(); return propertyPreservingHapiSpec("updateTokenWithoutNameSymbolMemo") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TopLevelSigsCanBeToggledByPrecompileTypeSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TopLevelSigsCanBeToggledByPrecompileTypeSuite.java index febe9cfc00a8..8a40d20c419d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TopLevelSigsCanBeToggledByPrecompileTypeSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/TopLevelSigsCanBeToggledByPrecompileTypeSuite.java @@ -133,7 +133,7 @@ public List getSpecsInSuite() { canToggleTopLevelSigUsageForWipePrecompile()); } - private HapiSpec canToggleTopLevelSigUsageForWipePrecompile() { + final HapiSpec canToggleTopLevelSigUsageForWipePrecompile() { final var failedWipeTxn = "failedWipeTxn"; final var succeededWipeTxn = "succeededWipeTxn"; @@ -194,7 +194,7 @@ private HapiSpec canToggleTopLevelSigUsageForWipePrecompile() { recordWith().status(INVALID_SIGNATURE))); } - private HapiSpec canToggleTopLevelSigUsageForUpdatePrecompile() { + final HapiSpec canToggleTopLevelSigUsageForUpdatePrecompile() { final var failedUpdateTxn = "failedUpdateTxn"; final var succeededUpdateTxn = "succeededUpdateTxn"; @@ -301,7 +301,7 @@ private HapiSpec canToggleTopLevelSigUsageForUpdatePrecompile() { recordWith().status(INVALID_SIGNATURE))); } - private HapiSpec canToggleTopLevelSigUsageForPauseAndUnpausePrecompile() { + final HapiSpec canToggleTopLevelSigUsageForPauseAndUnpausePrecompile() { final var failedPauseTxn = "failedPauseTxn"; final var failedUnpauseTxn = "failedUnpauseTxn"; final var succeededPauseTxn = "succeededPauseTxn"; @@ -389,7 +389,7 @@ private HapiSpec canToggleTopLevelSigUsageForPauseAndUnpausePrecompile() { recordWith().status(INVALID_SIGNATURE))); } - private HapiSpec canToggleTopLevelSigUsageForAssociatePrecompile() { + final HapiSpec canToggleTopLevelSigUsageForAssociatePrecompile() { final var tokenToAssociate = "tokenToAssociate"; final var accountToBeAssociated = "accountToBeAssociated"; final var failedAssociateTxn = "failedAssociateTxn"; @@ -438,7 +438,7 @@ private HapiSpec canToggleTopLevelSigUsageForAssociatePrecompile() { recordWith().status(INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE))); } - private HapiSpec canToggleTopLevelSigUsageForBurnPrecompile() { + final HapiSpec canToggleTopLevelSigUsageForBurnPrecompile() { final var failedBurnTxn = "failedBurnTxn"; final var succeededBurnTxn = "succeededBurnTxn"; @@ -494,7 +494,7 @@ private HapiSpec canToggleTopLevelSigUsageForBurnPrecompile() { recordWith().status(INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE))); } - private HapiSpec canToggleTopLevelSigUsageForMintPrecompile() { + final HapiSpec canToggleTopLevelSigUsageForMintPrecompile() { final var tokenToMint = "tokenToMint"; final var failedMintTxn = "failedMintTxn"; final var succeededMintTxn = "succeededMintTxn"; @@ -549,7 +549,7 @@ private HapiSpec canToggleTopLevelSigUsageForMintPrecompile() { recordWith().status(INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE))); } - private HapiSpec canToggleTopLevelSigUsageForDeletePrecompile() { + final HapiSpec canToggleTopLevelSigUsageForDeletePrecompile() { final var failedDeleteTxn = "failedDeleteTxn"; final var succeededDeleteTxn = "succeededDeleteTxn"; final AtomicReference accountID = new AtomicReference<>(); @@ -604,7 +604,7 @@ private HapiSpec canToggleTopLevelSigUsageForDeletePrecompile() { recordWith().status(INVALID_SIGNATURE))); } - private HapiSpec canToggleTopLevelSigUsageForFreezeAndUnfreezePrecompile() { + final HapiSpec canToggleTopLevelSigUsageForFreezeAndUnfreezePrecompile() { final var failedFreezeTxn = "failedFreezeTxn"; final var failedUnfreezeTxn = "failedUnfreezeTxn"; final var succeededFreezeTxn = "succeededFreezeTxn"; @@ -696,7 +696,7 @@ private HapiSpec canToggleTopLevelSigUsageForFreezeAndUnfreezePrecompile() { recordWith().status(INVALID_SIGNATURE))); } - private HapiSpec canToggleTopLevelSigUsageForGrantKycAndRevokeKycPrecompile() { + final HapiSpec canToggleTopLevelSigUsageForGrantKycAndRevokeKycPrecompile() { final var failedGrantTxn = "failedGrantTxn"; final var failedRevokeTxn = "failedRevokeTxn"; final var succeededGrantTxn = "succeededGrantTxn"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/WipeTokenAccountPrecompileV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/WipeTokenAccountPrecompileV1SecurityModelSuite.java index 17f10f621481..a0315c8d6ca8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/WipeTokenAccountPrecompileV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/WipeTokenAccountPrecompileV1SecurityModelSuite.java @@ -97,7 +97,7 @@ public List getSpecsInSuite() { return List.of(wipeFungibleTokenScenarios(), wipeNonFungibleTokenScenarios()); } - private HapiSpec wipeFungibleTokenScenarios() { + final HapiSpec wipeFungibleTokenScenarios() { final AtomicReference adminAccountID = new AtomicReference<>(); final AtomicReference accountID = new AtomicReference<>(); final AtomicReference secondAccountID = new AtomicReference<>(); @@ -221,7 +221,7 @@ private HapiSpec wipeFungibleTokenScenarios() { getAccountBalance(ACCOUNT).hasTokenBalance(VANILLA_TOKEN, 490)); } - private HapiSpec wipeNonFungibleTokenScenarios() { + final HapiSpec wipeNonFungibleTokenScenarios() { final AtomicReference adminAccountID = new AtomicReference<>(); final AtomicReference accountID = new AtomicReference<>(); final AtomicReference vanillaTokenID = new AtomicReference<>(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/records/LogsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/records/LogsSuite.java index c033b1228c76..59620c4c3818 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/records/LogsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/records/LogsSuite.java @@ -68,7 +68,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec log0Works() { + final HapiSpec log0Works() { return defaultHapiSpec("log0Works") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) .when(contractCall(CONTRACT, "log0", BigInteger.valueOf(15)) @@ -82,7 +82,7 @@ private HapiSpec log0Works() { } @HapiTest - private HapiSpec log1Works() { + final HapiSpec log1Works() { return defaultHapiSpec("log1Works") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) .when(contractCall(CONTRACT, "log1", BigInteger.valueOf(15)) @@ -99,7 +99,7 @@ private HapiSpec log1Works() { } @HapiTest - private HapiSpec log2Works() { + final HapiSpec log2Works() { return defaultHapiSpec("log2Works") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) .when(contractCall(CONTRACT, "log2", BigInteger.ONE, BigInteger.TWO) @@ -118,7 +118,7 @@ private HapiSpec log2Works() { } @HapiTest - private HapiSpec log3Works() { + final HapiSpec log3Works() { return defaultHapiSpec("log3Works") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) .when(contractCall(CONTRACT, "log3", BigInteger.ONE, BigInteger.TWO, BigInteger.valueOf(3)) @@ -138,7 +138,7 @@ private HapiSpec log3Works() { } @HapiTest - private HapiSpec log4Works() { + final HapiSpec log4Works() { return defaultHapiSpec("log4Works") .given(uploadInitCode(CONTRACT), contractCreate(CONTRACT)) .when(contractCall( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/traceability/TraceabilitySuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/traceability/TraceabilitySuite.java index 317ba41e199e..a628adefcd22 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/traceability/TraceabilitySuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/traceability/TraceabilitySuite.java @@ -214,7 +214,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec beforeAll() { + final HapiSpec beforeAll() { try { initialize(); } catch (final Exception e) { @@ -229,7 +229,7 @@ private HapiSpec beforeAll() { } @HapiTest - private HapiSpec traceabilityE2EScenario1() { + final HapiSpec traceabilityE2EScenario1() { return defaultHapiSpec("traceabilityE2EScenario1") .given( uploadInitCode(TRACEABILITY), @@ -599,7 +599,7 @@ private HapiSpec traceabilityE2EScenario1() { } @HapiTest - private HapiSpec traceabilityE2EScenario2() { + final HapiSpec traceabilityE2EScenario2() { return defaultHapiSpec("traceabilityE2EScenario2") .given( uploadInitCode(TRACEABILITY), @@ -1003,7 +1003,7 @@ private HapiSpec traceabilityE2EScenario2() { } @HapiTest - private HapiSpec traceabilityE2EScenario3() { + final HapiSpec traceabilityE2EScenario3() { return defaultHapiSpec("traceabilityE2EScenario3") .given( uploadInitCode(TRACEABILITY), @@ -1411,7 +1411,7 @@ private HapiSpec traceabilityE2EScenario3() { } @HapiTest - private HapiSpec traceabilityE2EScenario4() { + final HapiSpec traceabilityE2EScenario4() { return defaultHapiSpec("traceabilityE2EScenario4") .given( uploadInitCode(TRACEABILITY), @@ -1702,7 +1702,7 @@ private HapiSpec traceabilityE2EScenario4() { } @HapiTest - private HapiSpec traceabilityE2EScenario5() { + final HapiSpec traceabilityE2EScenario5() { return defaultHapiSpec("traceabilityE2EScenario5") .given( uploadInitCode(TRACEABILITY), @@ -2007,7 +2007,7 @@ private HapiSpec traceabilityE2EScenario5() { } @HapiTest - private HapiSpec traceabilityE2EScenario6() { + final HapiSpec traceabilityE2EScenario6() { return defaultHapiSpec("traceabilityE2EScenario6") .given( uploadInitCode(TRACEABILITY), @@ -2342,7 +2342,7 @@ private HapiSpec traceabilityE2EScenario6() { } @HapiTest - private HapiSpec traceabilityE2EScenario7() { + final HapiSpec traceabilityE2EScenario7() { return defaultHapiSpec("traceabilityE2EScenario7") .given( uploadInitCode(TRACEABILITY_CALLCODE), @@ -2732,7 +2732,7 @@ private HapiSpec traceabilityE2EScenario7() { } @HapiTest - private HapiSpec traceabilityE2EScenario8() { + final HapiSpec traceabilityE2EScenario8() { return defaultHapiSpec("traceabilityE2EScenario8") .given( uploadInitCode(TRACEABILITY_CALLCODE), @@ -3083,7 +3083,7 @@ private HapiSpec traceabilityE2EScenario8() { } @HapiTest - private HapiSpec traceabilityE2EScenario9() { + final HapiSpec traceabilityE2EScenario9() { return defaultHapiSpec("traceabilityE2EScenario9") .given( uploadInitCode(TRACEABILITY), @@ -3389,7 +3389,7 @@ private HapiSpec traceabilityE2EScenario9() { } @HapiTest - private HapiSpec traceabilityE2EScenario10() { + final HapiSpec traceabilityE2EScenario10() { return defaultHapiSpec("traceabilityE2EScenario10") .given( uploadInitCode(TRACEABILITY), @@ -3731,7 +3731,7 @@ private HapiSpec traceabilityE2EScenario10() { } @HapiTest - private HapiSpec traceabilityE2EScenario11() { + final HapiSpec traceabilityE2EScenario11() { return defaultHapiSpec("traceabilityE2EScenario11") .given( uploadInitCode(TRACEABILITY), @@ -4008,7 +4008,7 @@ private HapiSpec traceabilityE2EScenario11() { } @HapiTest - private HapiSpec traceabilityE2EScenario12() { + final HapiSpec traceabilityE2EScenario12() { final var contract = "CreateTrivial"; final var scenario12 = "traceabilityE2EScenario12"; return defaultHapiSpec(scenario12) @@ -4081,7 +4081,7 @@ HapiSpec traceabilityE2EScenario13() { expectContractBytecodeWithMinimalFieldsSidecarFor(FIRST_CREATE_TXN, PAY_RECEIVABLE_CONTRACT)); } - private HapiSpec traceabilityE2EScenario14() { + final HapiSpec traceabilityE2EScenario14() { return defaultHapiSpec("traceabilityE2EScenario14") .given( newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE), @@ -4370,7 +4370,7 @@ HapiSpec traceabilityE2EScenario16() { } @HapiTest - private HapiSpec traceabilityE2EScenario17() { + final HapiSpec traceabilityE2EScenario17() { return defaultHapiSpec("traceabilityE2EScenario17") .given( uploadInitCode(REVERTING_CONTRACT), @@ -4428,7 +4428,7 @@ private HapiSpec traceabilityE2EScenario17() { } @HapiTest - private HapiSpec traceabilityE2EScenario18() { + final HapiSpec traceabilityE2EScenario18() { return defaultHapiSpec("traceabilityE2EScenario18") .given(uploadInitCode(REVERTING_CONTRACT)) .when(contractCreate(REVERTING_CONTRACT, BigInteger.valueOf(4)) @@ -4493,7 +4493,7 @@ HapiSpec traceabilityE2EScenario19() { })); } - private HapiSpec traceabilityE2EScenario20() { + final HapiSpec traceabilityE2EScenario20() { return defaultHapiSpec("traceabilityE2EScenario20") .given(uploadInitCode(REVERTING_CONTRACT)) .when(contractCreate(REVERTING_CONTRACT, BigInteger.valueOf(6)) @@ -4518,7 +4518,7 @@ private HapiSpec traceabilityE2EScenario20() { } @HapiTest - private HapiSpec traceabilityE2EScenario21() { + final HapiSpec traceabilityE2EScenario21() { return defaultHapiSpec("traceabilityE2EScenario21") .given( uploadInitCode(REVERTING_CONTRACT), @@ -4592,7 +4592,7 @@ private HapiSpec traceabilityE2EScenario21() { } @HapiTest - private HapiSpec vanillaBytecodeSidecar() { + final HapiSpec vanillaBytecodeSidecar() { final var EMPTY_CONSTRUCTOR_CONTRACT = "EmptyConstructor"; final var vanillaBytecodeSidecar = "vanillaBytecodeSidecar"; final var firstTxn = "firstTxn"; @@ -4626,7 +4626,7 @@ private HapiSpec vanillaBytecodeSidecar() { } @HapiTest - private HapiSpec vanillaBytecodeSidecar2() { + final HapiSpec vanillaBytecodeSidecar2() { final var contract = "CreateTrivial"; final String trivialCreate = "vanillaBytecodeSidecar2"; final var firstTxn = "firstTxn"; @@ -4657,7 +4657,7 @@ private HapiSpec vanillaBytecodeSidecar2() { } @HapiTest - private HapiSpec actionsShowPropagatedRevert() { + final HapiSpec actionsShowPropagatedRevert() { final var APPROVE_BY_DELEGATE = "ApproveByDelegateCall"; final var badApproval = "BadApproval"; final var somebody = "somebody"; @@ -4835,7 +4835,7 @@ private HapiSpec actionsShowPropagatedRevert() { })); } - private HapiSpec ethereumLazyCreateExportsExpectedSidecars() { + final HapiSpec ethereumLazyCreateExportsExpectedSidecars() { final var RECIPIENT_KEY = "lazyAccountRecipient"; final var RECIPIENT_KEY2 = "lazyAccountRecipient2"; final var lazyCreateTxn = "lazyCreateTxn"; @@ -4926,7 +4926,7 @@ private HapiSpec ethereumLazyCreateExportsExpectedSidecars() { } @SuppressWarnings("java:S5960") - private HapiSpec hollowAccountCreate2MergeExportsExpectedSidecars() { + final HapiSpec hollowAccountCreate2MergeExportsExpectedSidecars() { final var tcValue = 1_234L; final var create2Factory = "Create2Factory"; final var creation = "creation"; @@ -5092,7 +5092,7 @@ create2Factory, GET_BYTECODE, asHeadlongAddress(factoryEvmAddress.get()), salt) } @SuppressWarnings("java:S5960") - private HapiSpec assertSidecars() { + final HapiSpec assertSidecars() { return defaultHapiSpec("assertSidecars") .given( // send a dummy transaction to trigger externalization of last sidecars diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationSuite.java index ecbcf7cd78c1..d1b43a6094dd 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountCreationSuite.java @@ -216,7 +216,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec canAutoCreateWithHbarAndTokenTransfers() { + final HapiSpec canAutoCreateWithHbarAndTokenTransfers() { final var initialTokenSupply = 1000; return defaultHapiSpec("canAutoCreateWithHbarAndTokenTransfers", EXPECT_STREAMLINED_INGEST_RECORDS) .given( @@ -249,7 +249,7 @@ private HapiSpec canAutoCreateWithHbarAndTokenTransfers() { } @HapiTest - private HapiSpec repeatedAliasInSameTransferListFails() { + final HapiSpec repeatedAliasInSameTransferListFails() { final AtomicReference ftId = new AtomicReference<>(); final AtomicReference nftId = new AtomicReference<>(); final AtomicReference partyId = new AtomicReference<>(); @@ -312,7 +312,7 @@ private HapiSpec repeatedAliasInSameTransferListFails() { } @HapiTest - private HapiSpec autoCreateWithNftFallBackFeeFails() { + final HapiSpec autoCreateWithNftFallBackFeeFails() { final var firstRoyaltyCollector = "firstRoyaltyCollector"; return defaultHapiSpec("autoCreateWithNftFallBackFeeFails", HIGHLY_NON_DETERMINISTIC_FEES) .given( @@ -375,7 +375,7 @@ private HapiSpec autoCreateWithNftFallBackFeeFails() { } @HapiTest - private HapiSpec canAutoCreateWithNftTransfersToAlias() { + final HapiSpec canAutoCreateWithNftTransfersToAlias() { final var civilianBal = 10 * ONE_HBAR; // The expected fee to transfer four serial numbers of two token types to a receiver with // no auto-creation; note it is approximate because the fee will vary slightly with the @@ -462,7 +462,7 @@ private HapiSpec canAutoCreateWithNftTransfersToAlias() { } @HapiTest - private HapiSpec canAutoCreateWithNftTransferToEvmAddress() { + final HapiSpec canAutoCreateWithNftTransferToEvmAddress() { final var civilianBal = 10 * ONE_HBAR; final var nftTransfer = "multiNftTransfer"; final AtomicReference parentConsTime = new AtomicReference<>(); @@ -506,7 +506,7 @@ private HapiSpec canAutoCreateWithNftTransferToEvmAddress() { recordWith().status(SUCCESS).consensusTimeImpliedByNonce(parentConsTime.get(), -1)))); } - private HapiSpec multipleTokenTransfersSucceed() { + final HapiSpec multipleTokenTransfersSucceed() { final var initialTokenSupply = 1000; final var multiTokenXfer = "multiTokenXfer"; @@ -595,7 +595,7 @@ private HapiSpec multipleTokenTransfersSucceed() { } @HapiTest - private HapiSpec payerBalanceIsReflectsAllChangesBeforeFeeCharging() { + final HapiSpec payerBalanceIsReflectsAllChangesBeforeFeeCharging() { final var secondAliasKey = "secondAlias"; final var secondPayer = "secondPayer"; final AtomicLong totalAutoCreationFees = new AtomicLong(); @@ -644,7 +644,7 @@ private HapiSpec payerBalanceIsReflectsAllChangesBeforeFeeCharging() { } @HapiTest - private HapiSpec canAutoCreateWithFungibleTokenTransfersToAlias() { + final HapiSpec canAutoCreateWithFungibleTokenTransfersToAlias() { final var initialTokenSupply = 1000; final var sameTokenXfer = "sameTokenXfer"; // The expected (network + service) fee for two token transfers to a receiver @@ -727,7 +727,7 @@ private HapiSpec canAutoCreateWithFungibleTokenTransfersToAlias() { } @HapiTest - private HapiSpec noStakePeriodStartIfNotStakingToNode() { + final HapiSpec noStakePeriodStartIfNotStakingToNode() { final var user = "user"; final var contract = "contract"; return defaultHapiSpec("noStakePeriodStartIfNotStakingToNode", NONDETERMINISTIC_TRANSACTION_FEES) @@ -746,7 +746,7 @@ private HapiSpec noStakePeriodStartIfNotStakingToNode() { } @HapiTest - private HapiSpec hollowAccountCreationWithCryptoTransfer() { + final HapiSpec hollowAccountCreationWithCryptoTransfer() { final var initialTokenSupply = 1000; final AtomicReference ftId = new AtomicReference<>(); final AtomicReference nftId = new AtomicReference<>(); @@ -851,7 +851,7 @@ private HapiSpec hollowAccountCreationWithCryptoTransfer() { } @HapiTest - private HapiSpec failureAfterHollowAccountCreationReclaimsAlias() { + final HapiSpec failureAfterHollowAccountCreationReclaimsAlias() { final var underfunded = "underfunded"; final var secondTransferTxn = "SecondTransferTxn"; final AtomicReference targetAddress = new AtomicReference<>(); @@ -899,7 +899,7 @@ private HapiSpec failureAfterHollowAccountCreationReclaimsAlias() { } @HapiTest - private HapiSpec canGetBalanceAndInfoViaAlias() { + final HapiSpec canGetBalanceAndInfoViaAlias() { final var ed25519SourceKey = "ed25519Alias"; final var secp256k1SourceKey = "secp256k1Alias"; final var secp256k1Shape = KeyShape.SECP256K1; @@ -948,7 +948,7 @@ private HapiSpec canGetBalanceAndInfoViaAlias() { } @HapiTest - private HapiSpec aliasCanBeUsedOnManyAccountsNotAsAlias() { + final HapiSpec aliasCanBeUsedOnManyAccountsNotAsAlias() { return defaultHapiSpec("aliasCanBeUsedOnManyAccountsNotAsAlias") .given( /* have alias key on other accounts and tokens not as alias */ @@ -982,7 +982,7 @@ private HapiSpec aliasCanBeUsedOnManyAccountsNotAsAlias() { } @HapiTest - private HapiSpec accountCreatedIfAliasUsedAsPubKey() { + final HapiSpec accountCreatedIfAliasUsedAsPubKey() { return defaultHapiSpec("accountCreatedIfAliasUsedAsPubKey") .given( newKeyNamed(ALIAS), @@ -1009,7 +1009,7 @@ private HapiSpec accountCreatedIfAliasUsedAsPubKey() { } @HapiTest - private HapiSpec autoAccountCreationWorksWhenUsingAliasOfDeletedAccount() { + final HapiSpec autoAccountCreationWorksWhenUsingAliasOfDeletedAccount() { return defaultHapiSpec("autoAccountCreationWorksWhenUsingAliasOfDeletedAccount") .given( newKeyNamed(ALIAS), @@ -1041,7 +1041,7 @@ private HapiSpec autoAccountCreationWorksWhenUsingAliasOfDeletedAccount() { } @HapiTest - private HapiSpec transferFromAliasToAlias() { + final HapiSpec transferFromAliasToAlias() { return defaultHapiSpec("transferFromAliasToAlias") .given( newKeyNamed(ALIAS), @@ -1066,7 +1066,7 @@ private HapiSpec transferFromAliasToAlias() { } @HapiTest - private HapiSpec transferFromAliasToAccount() { + final HapiSpec transferFromAliasToAccount() { final var payer = PAYER_4; final var alias = ALIAS; return defaultHapiSpec("transferFromAliasToAccount") @@ -1091,7 +1091,7 @@ private HapiSpec transferFromAliasToAccount() { } @HapiTest - private HapiSpec transferToAccountAutoCreatedUsingAccount() { + final HapiSpec transferToAccountAutoCreatedUsingAccount() { return defaultHapiSpec("transferToAccountAutoCreatedUsingAccount") .given(newKeyNamed(TRANSFER_ALIAS), cryptoCreate(PAYER).balance(INITIAL_BALANCE * ONE_HBAR)) .when( @@ -1123,7 +1123,7 @@ private HapiSpec transferToAccountAutoCreatedUsingAccount() { } @HapiTest - private HapiSpec transferToAccountAutoCreatedUsingAlias() { + final HapiSpec transferToAccountAutoCreatedUsingAlias() { return defaultHapiSpec("transferToAccountAutoCreatedUsingAlias") .given(newKeyNamed(ALIAS), cryptoCreate(PAYER).balance(INITIAL_BALANCE * ONE_HBAR)) .when( @@ -1149,7 +1149,7 @@ private HapiSpec transferToAccountAutoCreatedUsingAlias() { } @HapiTest - private HapiSpec autoAccountCreationUnsupportedAlias() { + final HapiSpec autoAccountCreationUnsupportedAlias() { final var threshKeyAlias = Key.newBuilder() .setThresholdKey(ThresholdKey.newBuilder() .setThreshold(2) @@ -1193,7 +1193,7 @@ private HapiSpec autoAccountCreationUnsupportedAlias() { } @HapiTest - private HapiSpec autoAccountCreationBadAlias() { + final HapiSpec autoAccountCreationBadAlias() { final var invalidAlias = VALID_25519_ALIAS.substring(0, 10); return defaultHapiSpec("autoAccountCreationBadAlias") @@ -1205,7 +1205,7 @@ private HapiSpec autoAccountCreationBadAlias() { } @HapiTest - private HapiSpec autoAccountCreationsHappyPath() { + final HapiSpec autoAccountCreationsHappyPath() { final var creationTime = new AtomicLong(); final long transferFee = 185030L; return defaultHapiSpec("autoAccountCreationsHappyPath", NONDETERMINISTIC_TRANSACTION_FEES) @@ -1313,7 +1313,7 @@ private void assertAliasBalanceAndFeeInChildRecord( } @HapiTest - private HapiSpec multipleAutoAccountCreations() { + final HapiSpec multipleAutoAccountCreations() { return defaultHapiSpec("multipleAutoAccountCreations") .given(cryptoCreate(PAYER).balance(INITIAL_BALANCE * ONE_HBAR)) .when( @@ -1346,7 +1346,7 @@ private HapiSpec multipleAutoAccountCreations() { } @HapiTest - private HapiSpec transferHbarsToEVMAddressAlias() { + final HapiSpec transferHbarsToEVMAddressAlias() { final AtomicReference partyId = new AtomicReference<>(); final AtomicReference partyAlias = new AtomicReference<>(); @@ -1403,7 +1403,7 @@ private HapiSpec transferHbarsToEVMAddressAlias() { } @HapiTest - private HapiSpec transferHbarsToECDSAKey() { + final HapiSpec transferHbarsToECDSAKey() { final AtomicReference evmAddress = new AtomicReference<>(); final var transferToECDSA = "transferToЕCDSA"; @@ -1450,7 +1450,7 @@ private HapiSpec transferHbarsToECDSAKey() { } @HapiTest - private HapiSpec transferFungibleToEVMAddressAlias() { + final HapiSpec transferFungibleToEVMAddressAlias() { final var fungibleToken = "fungibleToken"; final AtomicReference ftId = new AtomicReference<>(); @@ -1546,7 +1546,7 @@ private HapiSpec transferFungibleToEVMAddressAlias() { } @HapiTest - private HapiSpec transferNonFungibleToEVMAddressAlias() { + final HapiSpec transferNonFungibleToEVMAddressAlias() { final var nonFungibleToken = "nonFungibleToken"; final AtomicReference nftId = new AtomicReference<>(); final AtomicReference partyId = new AtomicReference<>(); @@ -1645,7 +1645,7 @@ private HapiSpec transferNonFungibleToEVMAddressAlias() { } @HapiTest - private HapiSpec cannotAutoCreateWithTxnToLongZero() { + final HapiSpec cannotAutoCreateWithTxnToLongZero() { final AtomicReference evmAddress = new AtomicReference<>(); final var longZeroAddress = ByteString.copyFrom(CommonUtils.unhex("0000000000000000000000000000000fffffffff")); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountUpdateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountUpdateSuite.java index e50c5754f58b..cf54c116c3ef 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountUpdateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/AutoAccountUpdateSuite.java @@ -82,7 +82,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec modifySigRequiredAfterAutoAccountCreation() { + final HapiSpec modifySigRequiredAfterAutoAccountCreation() { return defaultHapiSpec("modifySigRequiredAfterAutoAccountCreation") .given(newKeyNamed(ALIAS), cryptoCreate(PAYER).balance(INITIAL_BALANCE * ONE_HBAR)) .when( @@ -125,7 +125,7 @@ private HapiSpec modifySigRequiredAfterAutoAccountCreation() { } @HapiTest - private HapiSpec updateKeyOnAutoCreatedAccount() { + final HapiSpec updateKeyOnAutoCreatedAccount() { final var complexKey = "complexKey"; SigControl ENOUGH_UNIQUE_SIGS = KeyShape.threshSigs( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoApproveAllowanceSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoApproveAllowanceSuite.java index 230bc688887b..273fbededb42 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoApproveAllowanceSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoApproveAllowanceSuite.java @@ -160,7 +160,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec cannotPayForAnyTransactionWithContractAccount() { + final HapiSpec cannotPayForAnyTransactionWithContractAccount() { final var cryptoAdminKey = "cryptoAdminKey"; final var contractNum = new AtomicLong(); final var contract = "PayableConstructor"; @@ -181,7 +181,7 @@ private HapiSpec cannotPayForAnyTransactionWithContractAccount() { } @HapiTest - private HapiSpec transferringMissingNftViaApprovalFailsWithInvalidNftId() { + final HapiSpec transferringMissingNftViaApprovalFailsWithInvalidNftId() { return defaultHapiSpec("TransferringMissingNftViaApprovalFailsWithInvalidNftId") .given( newKeyNamed(SUPPLY_KEY), @@ -221,7 +221,7 @@ private HapiSpec transferringMissingNftViaApprovalFailsWithInvalidNftId() { } @HapiTest - private HapiSpec canDeleteAllowanceFromDeletedSpender() { + final HapiSpec canDeleteAllowanceFromDeletedSpender() { return defaultHapiSpec("canDeleteAllowanceFromDeletedSpender", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -318,7 +318,7 @@ private HapiSpec canDeleteAllowanceFromDeletedSpender() { } @HapiTest - private HapiSpec duplicateKeysAndSerialsInSameTxnDoesntThrow() { + final HapiSpec duplicateKeysAndSerialsInSameTxnDoesntThrow() { return defaultHapiSpec("duplicateKeysAndSerialsInSameTxnDoesntThrow", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -404,7 +404,7 @@ private HapiSpec duplicateKeysAndSerialsInSameTxnDoesntThrow() { } @HapiTest - private HapiSpec approveForAllSpenderCanDelegateOnNFT() { + final HapiSpec approveForAllSpenderCanDelegateOnNFT() { final String delegatingSpender = "delegatingSpender"; final String newSpender = "newSpender"; return defaultHapiSpec("approveForAllSpenderCanDelegateOnNFT", NONDETERMINISTIC_TRANSACTION_FEES) @@ -468,7 +468,7 @@ private HapiSpec approveForAllSpenderCanDelegateOnNFT() { } @HapiTest - private HapiSpec canGrantFungibleAllowancesWithTreasuryOwner() { + final HapiSpec canGrantFungibleAllowancesWithTreasuryOwner() { return defaultHapiSpec("canGrantFungibleAllowancesWithTreasuryOwner", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -503,7 +503,7 @@ private HapiSpec canGrantFungibleAllowancesWithTreasuryOwner() { } @HapiTest - private HapiSpec canGrantNftAllowancesWithTreasuryOwner() { + final HapiSpec canGrantNftAllowancesWithTreasuryOwner() { return defaultHapiSpec("canGrantNftAllowancesWithTreasuryOwner", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -547,7 +547,7 @@ private HapiSpec canGrantNftAllowancesWithTreasuryOwner() { } @HapiTest - private HapiSpec invalidOwnerFails() { + final HapiSpec invalidOwnerFails() { return defaultHapiSpec("invalidOwnerFails", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -611,7 +611,7 @@ private HapiSpec invalidOwnerFails() { } @HapiTest - private HapiSpec invalidSpenderFails() { + final HapiSpec invalidSpenderFails() { return defaultHapiSpec("invalidSpenderFails") .given( newKeyNamed(SUPPLY_KEY), @@ -668,7 +668,7 @@ private HapiSpec invalidSpenderFails() { } @HapiTest - private HapiSpec noOwnerDefaultsToPayer() { + final HapiSpec noOwnerDefaultsToPayer() { return defaultHapiSpec("noOwnerDefaultsToPayer", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -727,7 +727,7 @@ private HapiSpec noOwnerDefaultsToPayer() { } @HapiTest - private HapiSpec canHaveMultipleOwners() { + final HapiSpec canHaveMultipleOwners() { return defaultHapiSpec("canHaveMultipleOwners", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -822,7 +822,7 @@ private HapiSpec canHaveMultipleOwners() { } @HapiTest - private HapiSpec feesAsExpected() { + final HapiSpec feesAsExpected() { return defaultHapiSpec("feesAsExpected", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -947,7 +947,7 @@ private HapiSpec feesAsExpected() { } @HapiTest - private HapiSpec serialsInAscendingOrder() { + final HapiSpec serialsInAscendingOrder() { return defaultHapiSpec("serialsInAscendingOrder") .given( newKeyNamed(SUPPLY_KEY), @@ -993,7 +993,7 @@ private HapiSpec serialsInAscendingOrder() { } @HapiTest - private HapiSpec succeedsWhenTokenPausedFrozenKycRevoked() { + final HapiSpec succeedsWhenTokenPausedFrozenKycRevoked() { return defaultHapiSpec("succeedsWhenTokenPausedFrozenKycRevoked", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -1084,7 +1084,7 @@ private HapiSpec succeedsWhenTokenPausedFrozenKycRevoked() { } @HapiTest - private HapiSpec tokenExceedsMaxSupplyFails() { + final HapiSpec tokenExceedsMaxSupplyFails() { return defaultHapiSpec("tokenExceedsMaxSupplyFails", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -1111,7 +1111,7 @@ private HapiSpec tokenExceedsMaxSupplyFails() { } @HapiTest - private HapiSpec validatesSerialNums() { + final HapiSpec validatesSerialNums() { return defaultHapiSpec("validatesSerialNums") .given( newKeyNamed(SUPPLY_KEY), @@ -1160,7 +1160,7 @@ private HapiSpec validatesSerialNums() { } @HapiTest - private HapiSpec invalidTokenTypeFails() { + final HapiSpec invalidTokenTypeFails() { return defaultHapiSpec("invalidTokenTypeFails") .given( newKeyNamed(SUPPLY_KEY), @@ -1210,7 +1210,7 @@ private HapiSpec invalidTokenTypeFails() { } @HapiTest - private HapiSpec emptyAllowancesRejected() { + final HapiSpec emptyAllowancesRejected() { return defaultHapiSpec("emptyAllowancesRejected") .given(cryptoCreate(OWNER).balance(ONE_HUNDRED_HBARS).maxAutomaticTokenAssociations(10)) .when(cryptoApproveAllowance().hasPrecheck(EMPTY_ALLOWANCES).fee(ONE_HUNDRED_HBARS)) @@ -1218,7 +1218,7 @@ private HapiSpec emptyAllowancesRejected() { } @HapiTest - private HapiSpec tokenNotAssociatedToAccountFails() { + final HapiSpec tokenNotAssociatedToAccountFails() { return defaultHapiSpec("tokenNotAssociatedToAccountFails") .given( newKeyNamed(SUPPLY_KEY), @@ -1269,7 +1269,7 @@ private HapiSpec tokenNotAssociatedToAccountFails() { } @HapiTest - private HapiSpec negativeAmountFailsForFungible() { + final HapiSpec negativeAmountFailsForFungible() { return defaultHapiSpec("negativeAmountFailsForFungible") .given( newKeyNamed(SUPPLY_KEY), @@ -1324,7 +1324,7 @@ private HapiSpec negativeAmountFailsForFungible() { } @HapiTest - private HapiSpec happyPathWorks() { + final HapiSpec happyPathWorks() { return defaultHapiSpec("happyPathWorks", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -1390,7 +1390,7 @@ private HapiSpec happyPathWorks() { } @HapiTest - private HapiSpec duplicateEntriesGetsReplacedWithDifferentTxn() { + final HapiSpec duplicateEntriesGetsReplacedWithDifferentTxn() { return defaultHapiSpec("duplicateEntriesGetsReplacedWithDifferentTxn", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -1482,7 +1482,7 @@ private HapiSpec duplicateEntriesGetsReplacedWithDifferentTxn() { } @HapiTest - private HapiSpec cannotHaveMultipleAllowedSpendersForTheSameNFTSerial() { + final HapiSpec cannotHaveMultipleAllowedSpendersForTheSameNFTSerial() { return defaultHapiSpec( "CannotHaveMultipleAllowedSpendersForTheSameNFTSerial", NONDETERMINISTIC_TRANSACTION_FEES) .given( @@ -1562,7 +1562,7 @@ private HapiSpec cannotHaveMultipleAllowedSpendersForTheSameNFTSerial() { } @HapiTest - private HapiSpec approveForAllDoesNotSetExplicitNFTSpender() { + final HapiSpec approveForAllDoesNotSetExplicitNFTSpender() { return defaultHapiSpec("approveForAllDoesNotSetExplicitNFTSpender", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), @@ -1602,7 +1602,7 @@ private HapiSpec approveForAllDoesNotSetExplicitNFTSpender() { } @HapiTest - private HapiSpec scheduledCryptoApproveAllowanceWorks() { + final HapiSpec scheduledCryptoApproveAllowanceWorks() { return defaultHapiSpec("ScheduledCryptoApproveAllowanceWorks", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SUPPLY_KEY), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCornerCasesSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCornerCasesSuite.java index 289f3ddaa6f4..1e742cdf8486 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCornerCasesSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCornerCasesSuite.java @@ -71,7 +71,7 @@ private static Transaction removeTransactionBody(Transaction txn) { } @HapiTest - private HapiSpec invalidTransactionBody() { + final HapiSpec invalidTransactionBody() { return defaultHapiSpec("InvalidTransactionBody") .given() .when() @@ -93,7 +93,7 @@ private static Transaction replaceTxnNodeAccount(Transaction txn) { } @HapiTest - private HapiSpec invalidNodeAccount() { + final HapiSpec invalidNodeAccount() { return defaultHapiSpec("InvalidNodeAccount") .given() .when() @@ -108,7 +108,7 @@ private static Transaction replaceTxnDuration(Transaction txn) { } @HapiTest - private HapiSpec invalidTransactionDuration() { + final HapiSpec invalidTransactionDuration() { return defaultHapiSpec("InvalidTransactionDuration") .given() .when() @@ -124,7 +124,7 @@ private static Transaction replaceTxnMemo(Transaction txn) { } @HapiTest - private HapiSpec invalidTransactionMemoTooLong() { + final HapiSpec invalidTransactionMemoTooLong() { return defaultHapiSpec("InvalidTransactionMemoTooLong") .given() .when() @@ -144,7 +144,7 @@ private static Transaction replaceTxnPayerAccount(Transaction txn) { } @HapiTest - private HapiSpec invalidTransactionPayerAccountNotFound() { + final HapiSpec invalidTransactionPayerAccountNotFound() { return defaultHapiSpec("InvalidTransactionDuration") .given() .when() @@ -160,7 +160,7 @@ private static Transaction replaceTxnStartTtime(Transaction txn) { } @HapiTest - private HapiSpec invalidTransactionStartTime() { + final HapiSpec invalidTransactionStartTime() { return defaultHapiSpec("InvalidTransactionStartTime") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateForSuiteRunner.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateForSuiteRunner.java index ce738675b25c..18d38588d2ec 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateForSuiteRunner.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateForSuiteRunner.java @@ -69,7 +69,7 @@ public List getSpecsInSuite() { } @SuppressWarnings({"java:S5960", "java:S1141", "java:S1135"}) - private HapiSpec createAccount() { + final HapiSpec createAccount() { int maxRetries = 5; return customHapiSpec("CreatePayerAccountForEachClient") .withProperties(Map.of("nodes", nodes, "default.node", "0.0." + defaultNode)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateSuite.java index 231df0e4c00f..09f999da3771 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoCreateSuite.java @@ -122,7 +122,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec createAnAccountWithStakingFields() { + final HapiSpec createAnAccountWithStakingFields() { return defaultHapiSpec("createAnAccountWithStakingFields") .given( cryptoCreate("civilianWORewardStakingNode") @@ -177,7 +177,7 @@ private HapiSpec createAnAccountWithStakingFields() { } @HapiTest - private HapiSpec cannotCreateAnAccountWithLongZeroKeyButCanUseEvmAddress() { + final HapiSpec cannotCreateAnAccountWithLongZeroKeyButCanUseEvmAddress() { final AtomicReference secp256k1Key = new AtomicReference<>(); final AtomicReference evmAddress = new AtomicReference<>(); final var ecdsaKey = "ecdsaKey"; @@ -203,7 +203,7 @@ private HapiSpec cannotCreateAnAccountWithLongZeroKeyButCanUseEvmAddress() { /* Prior to 0.13.0, a "canonical" CryptoCreate (one sig, 3 month auto-renew) cost 1¢. */ @HapiTest - private HapiSpec usdFeeAsExpected() { + final HapiSpec usdFeeAsExpected() { double preV13PriceUsd = 0.01; double v13PriceUsd = 0.05; double autoAssocSlotPrice = 0.0018; @@ -274,7 +274,7 @@ public HapiSpec syntaxChecksAreAsExpected() { } @HapiTest - private HapiSpec createAnAccountEmptyThresholdKey() { + final HapiSpec createAnAccountEmptyThresholdKey() { KeyShape shape = threshOf(0, 0); long initialBalance = 10_000L; @@ -289,7 +289,7 @@ private HapiSpec createAnAccountEmptyThresholdKey() { } @HapiTest - private HapiSpec createAnAccountEmptyKeyList() { + final HapiSpec createAnAccountEmptyKeyList() { KeyShape shape = listOf(0); long initialBalance = 10_000L; @@ -309,7 +309,7 @@ private HapiSpec createAnAccountEmptyKeyList() { } @HapiTest - private HapiSpec createAnAccountEmptyNestedKey() { + final HapiSpec createAnAccountEmptyNestedKey() { KeyShape emptyThresholdShape = threshOf(0, 0); KeyShape emptyListShape = listOf(0); KeyShape shape = threshOf(2, emptyThresholdShape, emptyListShape); @@ -327,7 +327,7 @@ private HapiSpec createAnAccountEmptyNestedKey() { // One of element in key list is not valid @HapiTest - private HapiSpec createAnAccountInvalidKeyList() { + final HapiSpec createAnAccountInvalidKeyList() { KeyShape emptyThresholdShape = threshOf(0, 0); KeyShape shape = listOf(SIMPLE, SIMPLE, emptyThresholdShape); long initialBalance = 10_000L; @@ -344,7 +344,7 @@ private HapiSpec createAnAccountInvalidKeyList() { // One of element in nested key list is not valid @HapiTest - private HapiSpec createAnAccountInvalidNestedKeyList() { + final HapiSpec createAnAccountInvalidNestedKeyList() { KeyShape invalidListShape = listOf(SIMPLE, SIMPLE, listOf(0)); KeyShape shape = listOf(SIMPLE, SIMPLE, invalidListShape); long initialBalance = 10_000L; @@ -361,7 +361,7 @@ private HapiSpec createAnAccountInvalidNestedKeyList() { // One of element in threshold key is not valid @HapiTest - private HapiSpec createAnAccountInvalidThresholdKey() { + final HapiSpec createAnAccountInvalidThresholdKey() { KeyShape emptyListShape = listOf(0); KeyShape thresholdShape = threshOf(1, SIMPLE, SIMPLE, emptyListShape); long initialBalance = 10_000L; @@ -418,7 +418,7 @@ private HapiSpec createAnAccountInvalidThresholdKey() { } @HapiTest - private HapiSpec createAnAccountInvalidNestedThresholdKey() { + final HapiSpec createAnAccountInvalidNestedThresholdKey() { KeyShape goodShape = threshOf(2, 3); KeyShape thresholdShape0 = threshOf(0, SIMPLE, SIMPLE, SIMPLE); KeyShape thresholdShape4 = threshOf(4, SIMPLE, SIMPLE, SIMPLE); @@ -447,7 +447,7 @@ private HapiSpec createAnAccountInvalidNestedThresholdKey() { } @HapiTest - private HapiSpec createAnAccountThresholdKeyWithInvalidThreshold() { + final HapiSpec createAnAccountThresholdKeyWithInvalidThreshold() { KeyShape thresholdShape0 = threshOf(0, SIMPLE, SIMPLE, SIMPLE); KeyShape thresholdShape4 = threshOf(4, SIMPLE, SIMPLE, SIMPLE); @@ -470,7 +470,7 @@ private HapiSpec createAnAccountThresholdKeyWithInvalidThreshold() { } @HapiTest - private HapiSpec createAnAccountInvalidED25519() { + final HapiSpec createAnAccountInvalidED25519() { long initialBalance = 10_000L; Key emptyKey = Key.newBuilder().setEd25519(ByteString.EMPTY).build(); Key shortKey = @@ -502,7 +502,7 @@ private HapiSpec createAnAccountInvalidED25519() { } @HapiTest - private HapiSpec createAnAccountWithECDSAAlias() { + final HapiSpec createAnAccountWithECDSAAlias() { return defaultHapiSpec("CreateAnAccountWithECDSAAlias") .given(newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE)) .when(withOpContext((spec, opLog) -> { @@ -518,7 +518,7 @@ private HapiSpec createAnAccountWithECDSAAlias() { } @HapiTest - private HapiSpec createAnAccountWithED25519Alias() { + final HapiSpec createAnAccountWithED25519Alias() { return defaultHapiSpec("CreateAnAccountWithED25519Alias") .given(newKeyNamed(ED_25519_KEY).shape(KeyShape.ED25519)) .when(withOpContext((spec, opLog) -> { @@ -534,7 +534,7 @@ private HapiSpec createAnAccountWithED25519Alias() { } @HapiTest - private HapiSpec createAnAccountWithECKeyAndNoAlias() { + final HapiSpec createAnAccountWithECKeyAndNoAlias() { return defaultHapiSpec("CreateAnAccountWithECKeyAndNoAlias") .given(newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE)) .when(withOpContext((spec, opLog) -> { @@ -579,7 +579,7 @@ private HapiSpec createAnAccountWithECKeyAndNoAlias() { } @HapiTest - private HapiSpec createAnAccountWithEDKeyAndNoAlias() { + final HapiSpec createAnAccountWithEDKeyAndNoAlias() { return defaultHapiSpec("CreateAnAccountWithEDKeyAndNoAlias") .given(newKeyNamed(ED_25519_KEY).shape(KeyShape.ED25519)) .when(cryptoCreate(ACCOUNT).key(ED_25519_KEY)) @@ -588,7 +588,7 @@ private HapiSpec createAnAccountWithEDKeyAndNoAlias() { } @HapiTest - private HapiSpec createAnAccountWithED25519KeyAndED25519Alias() { + final HapiSpec createAnAccountWithED25519KeyAndED25519Alias() { return defaultHapiSpec("CreateAnAccountWithED25519KeyAndED25519Alias") .given(newKeyNamed(ED_25519_KEY).shape(KeyShape.ED25519)) .when(withOpContext((spec, opLog) -> { @@ -605,7 +605,7 @@ private HapiSpec createAnAccountWithED25519KeyAndED25519Alias() { } @HapiTest - private HapiSpec createAnAccountWithECKeyAndECKeyAlias() { + final HapiSpec createAnAccountWithECKeyAndECKeyAlias() { return defaultHapiSpec("CreateAnAccountWithECKeyAndECKeyAlias") .given(newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE)) .when(withOpContext((spec, opLog) -> { @@ -641,7 +641,7 @@ private HapiSpec createAnAccountWithECKeyAndECKeyAlias() { } @HapiTest - private HapiSpec createAnAccountWithECDSAKeyAliasDifferentThanAdminKeyShouldFail() { + final HapiSpec createAnAccountWithECDSAKeyAliasDifferentThanAdminKeyShouldFail() { return defaultHapiSpec("createAnAccountWithECDSAKeyAliasDifferentThanAdminKeyShouldFail") .given( newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE), @@ -661,7 +661,7 @@ private HapiSpec createAnAccountWithECDSAKeyAliasDifferentThanAdminKeyShouldFail } @HapiTest - private HapiSpec createAnAccountWithEVMAddressAliasFromSameKey() { + final HapiSpec createAnAccountWithEVMAddressAliasFromSameKey() { final var edKey = "edKey"; return defaultHapiSpec("createAnAccountWithEVMAddressAliasFromSameKey") .given( @@ -708,7 +708,7 @@ private HapiSpec createAnAccountWithEVMAddressAliasFromSameKey() { } @HapiTest - private HapiSpec createAnAccountWithEVMAddressAliasFromDifferentKey() { + final HapiSpec createAnAccountWithEVMAddressAliasFromDifferentKey() { return defaultHapiSpec("createAnAccountWithEVMAddressAliasFromDifferentKey") .given( newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE), @@ -748,7 +748,7 @@ private HapiSpec createAnAccountWithEVMAddressAliasFromDifferentKey() { } @HapiTest - private HapiSpec createAnAccountWithEDKeyAliasDifferentThanAdminKeyShouldFail() { + final HapiSpec createAnAccountWithEDKeyAliasDifferentThanAdminKeyShouldFail() { return defaultHapiSpec("createAnAccountWithEDKeyAliasDifferentThanAdminKeyShouldFail") .given( newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteAllowanceSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteAllowanceSuite.java index 9f4aa4c85912..5e3173ab66ac 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteAllowanceSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteAllowanceSuite.java @@ -93,7 +93,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec canDeleteAllowanceForDeletedSpender() { + final HapiSpec canDeleteAllowanceForDeletedSpender() { final String owner = "owner"; final String spender = "spender"; final String nft = "nft"; @@ -150,7 +150,7 @@ private HapiSpec canDeleteAllowanceForDeletedSpender() { } @HapiTest - private HapiSpec duplicateEntriesDoesntThrow() { + final HapiSpec duplicateEntriesDoesntThrow() { final String owner = "owner"; final String spender = "spender"; final String token = "token"; @@ -227,7 +227,7 @@ private HapiSpec duplicateEntriesDoesntThrow() { } @HapiTest - private HapiSpec invalidOwnerFails() { + final HapiSpec invalidOwnerFails() { final String owner = "owner"; final String spender = "spender"; final String token = "token"; @@ -283,7 +283,7 @@ private HapiSpec invalidOwnerFails() { } @HapiTest - private HapiSpec feesAsExpected() { + final HapiSpec feesAsExpected() { final String owner = "owner"; final String spender = "spender"; final String token = "token"; @@ -371,7 +371,7 @@ private HapiSpec feesAsExpected() { } @HapiTest - private HapiSpec succeedsWhenTokenPausedFrozenKycRevoked() { + final HapiSpec succeedsWhenTokenPausedFrozenKycRevoked() { final String owner = "owner"; final String spender = "spender"; final String spender1 = "spender1"; @@ -468,7 +468,7 @@ private HapiSpec succeedsWhenTokenPausedFrozenKycRevoked() { } @HapiTest - private HapiSpec exceedsTransactionLimit() { + final HapiSpec exceedsTransactionLimit() { final String owner = "owner"; final String spender = "spender"; final String spender1 = "spender1"; @@ -543,7 +543,7 @@ private HapiSpec exceedsTransactionLimit() { } @HapiTest - private HapiSpec validatesSerialNums() { + final HapiSpec validatesSerialNums() { final String owner = "owner"; final String spender = "spender"; final String nft = "nft"; @@ -599,7 +599,7 @@ private HapiSpec validatesSerialNums() { } @HapiTest - private HapiSpec invalidTokenTypeFailsInDeleteAllowance() { + final HapiSpec invalidTokenTypeFailsInDeleteAllowance() { final String owner = "owner"; final String spender = "spender"; final String token = "token"; @@ -628,7 +628,7 @@ private HapiSpec invalidTokenTypeFailsInDeleteAllowance() { } @HapiTest - private HapiSpec emptyAllowancesDeleteRejected() { + final HapiSpec emptyAllowancesDeleteRejected() { final String owner = "owner"; return defaultHapiSpec("emptyAllowancesDeleteRejected") .given(cryptoCreate(owner).balance(ONE_HUNDRED_HBARS).maxAutomaticTokenAssociations(10)) @@ -637,7 +637,7 @@ private HapiSpec emptyAllowancesDeleteRejected() { } @HapiTest - private HapiSpec tokenNotAssociatedToAccountFailsOnDeleteAllowance() { + final HapiSpec tokenNotAssociatedToAccountFailsOnDeleteAllowance() { final String owner = "owner"; final String spender = "spender"; final String token = "token"; @@ -685,7 +685,7 @@ private HapiSpec tokenNotAssociatedToAccountFailsOnDeleteAllowance() { } @HapiTest - private HapiSpec canDeleteMultipleOwners() { + final HapiSpec canDeleteMultipleOwners() { final String owner1 = "owner1"; final String owner2 = "owner2"; final String spender = "spender"; @@ -777,7 +777,7 @@ private HapiSpec canDeleteMultipleOwners() { } @HapiTest - private HapiSpec noOwnerDefaultsToPayerInDeleteAllowance() { + final HapiSpec noOwnerDefaultsToPayerInDeleteAllowance() { final String payer = "payer"; final String spender = "spender"; final String spender1 = "spender1"; @@ -840,7 +840,7 @@ private HapiSpec noOwnerDefaultsToPayerInDeleteAllowance() { } @HapiTest - private HapiSpec approvedForAllNotAffectedOnDelete() { + final HapiSpec approvedForAllNotAffectedOnDelete() { final String owner = "owner"; final String spender = "spender"; final String token = "token"; @@ -915,7 +915,7 @@ private HapiSpec approvedForAllNotAffectedOnDelete() { } @HapiTest - private HapiSpec happyPathWorks() { + final HapiSpec happyPathWorks() { final String owner = "owner"; final String spender = "spender"; final String spender1 = "spender1"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteSuite.java index 3219eb213d02..1df6abdab968 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoDeleteSuite.java @@ -88,7 +88,7 @@ public List getSpecsInSuite() { @HapiTest // In this transactionFee is not set in mono-service record, because it fails in node due diligence. // But it feels right to set it. So setting this HIGHLY_NONDETERMINISTIC_TRANSACTION_FEES - private HapiSpec deletedAccountCannotBePayer() { + final HapiSpec deletedAccountCannotBePayer() { // Account Names String SUBMITTING_NODE_ACCOUNT = "0.0.3"; String BENEFICIARY_ACCOUNT = "beneficiaryAccountForDeletedAccount"; @@ -119,7 +119,7 @@ private HapiSpec deletedAccountCannotBePayer() { } @HapiTest - private HapiSpec canQueryForRecordsWithDeletedPayers() { + final HapiSpec canQueryForRecordsWithDeletedPayers() { final var stillQueryableTxn = "stillQueryableTxn"; return defaultHapiSpec("CanQueryForRecordsWithDeletedPayers") .given(cryptoCreate(ACCOUNT_TO_BE_DELETED)) @@ -132,7 +132,7 @@ private HapiSpec canQueryForRecordsWithDeletedPayers() { } @HapiTest - private HapiSpec fundsTransferOnDelete() { + final HapiSpec fundsTransferOnDelete() { long B = HapiSpecSetup.getDefaultInstance().defaultBalance(); return defaultHapiSpec("FundsTransferOnDelete") @@ -151,7 +151,7 @@ private HapiSpec fundsTransferOnDelete() { } @HapiTest - private HapiSpec cannotDeleteAccountsWithNonzeroTokenBalances() { + final HapiSpec cannotDeleteAccountsWithNonzeroTokenBalances() { return defaultHapiSpec("CannotDeleteAccountsWithNonzeroTokenBalances") .given( newKeyNamed("admin"), @@ -189,7 +189,7 @@ private HapiSpec cannotDeleteAccountsWithNonzeroTokenBalances() { } @HapiTest - private HapiSpec cannotDeleteAlreadyDeletedAccount() { + final HapiSpec cannotDeleteAlreadyDeletedAccount() { return defaultHapiSpec("CannotDeleteAlreadyDeletedAccount", NONDETERMINISTIC_TRANSACTION_FEES) .given(cryptoCreate(ACCOUNT_TO_BE_DELETED), cryptoCreate(TRANSFER_ACCOUNT)) .when(cryptoDelete(ACCOUNT_TO_BE_DELETED) @@ -201,7 +201,7 @@ private HapiSpec cannotDeleteAlreadyDeletedAccount() { } @HapiTest - private HapiSpec cannotDeleteAccountWithSameBeneficiary() { + final HapiSpec cannotDeleteAccountWithSameBeneficiary() { return defaultHapiSpec("CannotDeleteAccountWithSameBeneficiary") .given(cryptoCreate(ACCOUNT_TO_BE_DELETED)) .when() @@ -211,7 +211,7 @@ private HapiSpec cannotDeleteAccountWithSameBeneficiary() { } @HapiTest - private HapiSpec cannotDeleteTreasuryAccount() { + final HapiSpec cannotDeleteTreasuryAccount() { return defaultHapiSpec("CannotDeleteTreasuryAccount", NONDETERMINISTIC_TRANSACTION_FEES) .given(cryptoCreate(TREASURY), cryptoCreate(TRANSFER_ACCOUNT)) .when(tokenCreate("toBeTransferred") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetInfoRegression.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetInfoRegression.java index 54cf461f4b80..28c78dcb15f9 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetInfoRegression.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetInfoRegression.java @@ -85,7 +85,7 @@ public List getSpecsInSuite() { /** For Demo purpose : The limit on each account info and account balance queries is set to 5 */ @HapiTest - private HapiSpec fetchesOnlyALimitedTokenAssociations() { + final HapiSpec fetchesOnlyALimitedTokenAssociations() { final int infoLimit = 3; final var account = "test"; final var aKey = "tokenKey"; @@ -197,7 +197,7 @@ private HapiSpec fetchesOnlyALimitedTokenAssociations() { } @HapiTest - private HapiSpec succeedsNormally() { + final HapiSpec succeedsNormally() { long balance = 1_234_567L; KeyShape misc = listOf(SIMPLE, listOf(2)); @@ -238,7 +238,7 @@ private HapiSpec succeedsNormally() { } @HapiTest - private HapiSpec failsForMissingAccount() { + final HapiSpec failsForMissingAccount() { return defaultHapiSpec("FailsForMissingAccount") .given() .when() @@ -246,7 +246,7 @@ private HapiSpec failsForMissingAccount() { } @HapiTest - private HapiSpec failsForMalformedPayment() { + final HapiSpec failsForMalformedPayment() { return defaultHapiSpec("FailsForMalformedPayment") .given(newKeyNamed("wrong").shape(SIMPLE)) .when() @@ -254,7 +254,7 @@ private HapiSpec failsForMalformedPayment() { } @HapiTest - private HapiSpec failsForUnfundablePayment() { + final HapiSpec failsForUnfundablePayment() { long everything = 1_234L; return defaultHapiSpec("FailsForUnfundablePayment") .given(cryptoCreate("brokePayer").balance(everything)) @@ -266,7 +266,7 @@ private HapiSpec failsForUnfundablePayment() { } // this test failed on mono code too, don't need to enable it - private HapiSpec failsForInsufficientPayment() { + final HapiSpec failsForInsufficientPayment() { return defaultHapiSpec("FailsForInsufficientPayment") .given() .when() @@ -274,7 +274,7 @@ private HapiSpec failsForInsufficientPayment() { } @HapiTest // this test needs to be updated for both mono and module code. - private HapiSpec failsForMissingPayment() { + final HapiSpec failsForMissingPayment() { return defaultHapiSpec("FailsForMissingPayment") .given() .when() @@ -284,7 +284,7 @@ private HapiSpec failsForMissingPayment() { } @HapiTest - private HapiSpec failsForDeletedAccount() { + final HapiSpec failsForDeletedAccount() { return defaultHapiSpec("FailsForDeletedAccount") .given(cryptoCreate("toBeDeleted")) .when(cryptoDelete("toBeDeleted").transfer(GENESIS)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetRecordsRegression.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetRecordsRegression.java index 8d86224e7950..36352e5d176a 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetRecordsRegression.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoGetRecordsRegression.java @@ -78,7 +78,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec succeedsNormally() { + final HapiSpec succeedsNormally() { String memo = "Dim galleries, dusky corridors got past..."; return defaultHapiSpec("SucceedsNormally") @@ -97,7 +97,7 @@ private HapiSpec succeedsNormally() { } @HapiTest - private HapiSpec failsForMissingAccount() { + final HapiSpec failsForMissingAccount() { return defaultHapiSpec("FailsForMissingAccount") .given() .when() @@ -107,7 +107,7 @@ private HapiSpec failsForMissingAccount() { } @HapiTest - private HapiSpec failsForMalformedPayment() { + final HapiSpec failsForMalformedPayment() { return defaultHapiSpec("FailsForMalformedPayment") .given(newKeyNamed("wrong").shape(SIMPLE)) .when() @@ -115,7 +115,7 @@ private HapiSpec failsForMalformedPayment() { } @HapiTest - private HapiSpec failsForUnfundablePayment() { + final HapiSpec failsForUnfundablePayment() { long everything = 1_234L; return defaultHapiSpec("FailsForUnfundablePayment") .given(cryptoCreate("brokePayer").balance(everything)) @@ -127,7 +127,7 @@ private HapiSpec failsForUnfundablePayment() { } @HapiTest - private HapiSpec failsForInsufficientPayment() { + final HapiSpec failsForInsufficientPayment() { return defaultHapiSpec("FailsForInsufficientPayment") .given(cryptoCreate(PAYER)) .when() @@ -138,7 +138,7 @@ private HapiSpec failsForInsufficientPayment() { } @HapiTest - private HapiSpec failsForInvalidTrxBody() { + final HapiSpec failsForInvalidTrxBody() { return defaultHapiSpec("failsForInvalidTrxBody") .given() .when() @@ -148,7 +148,7 @@ private HapiSpec failsForInvalidTrxBody() { } @HapiTest - private HapiSpec failsForDeletedAccount() { + final HapiSpec failsForDeletedAccount() { return defaultHapiSpec("FailsForDeletedAccount") .given(cryptoCreate(ACCOUNT_TO_BE_DELETED)) .when(cryptoDelete(ACCOUNT_TO_BE_DELETED).transfer(GENESIS)) @@ -160,7 +160,7 @@ private HapiSpec failsForDeletedAccount() { } @HapiTest - private HapiSpec getAccountRecords_testForDuplicates() { + final HapiSpec getAccountRecords_testForDuplicates() { return defaultHapiSpec("testForDuplicateAccountRecords") .given( cryptoCreate(ACCOUNT_1).balance(5000000000000L).sendThreshold(1L), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoTransferSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoTransferSuite.java index c1efddbfeb08..2ad45803dfbe 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoTransferSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoTransferSuite.java @@ -252,7 +252,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec okToRepeatSerialNumbersInWipeList() { + final HapiSpec okToRepeatSerialNumbersInWipeList() { final var ownerWith4AutoAssoc = "ownerWith4AutoAssoc"; return defaultHapiSpec("OkToRepeatSerialNumbersInWipeList") .given( @@ -289,7 +289,7 @@ private HapiSpec okToRepeatSerialNumbersInWipeList() { } @HapiTest - private HapiSpec okToRepeatSerialNumbersInBurnList() { + final HapiSpec okToRepeatSerialNumbersInBurnList() { return defaultHapiSpec("okToRepeatSerialNumbersInBurnList") .given( newKeyNamed(SUPPLY_KEY), @@ -321,7 +321,7 @@ private HapiSpec okToRepeatSerialNumbersInBurnList() { } @HapiTest // fees differ expected 46889349 actual 46887567 - private HapiSpec canUseAliasAndAccountCombinations() { + final HapiSpec canUseAliasAndAccountCombinations() { final AtomicReference ftId = new AtomicReference<>(); final AtomicReference nftId = new AtomicReference<>(); final AtomicReference partyId = new AtomicReference<>(); @@ -371,7 +371,7 @@ private HapiSpec canUseAliasAndAccountCombinations() { } @HapiTest - private HapiSpec aliasKeysAreValidated() { + final HapiSpec aliasKeysAreValidated() { final var validAlias = "validAlias"; final var invalidAlias = "invalidAlias"; @@ -402,7 +402,7 @@ private HapiSpec aliasKeysAreValidated() { // https://github.com/hashgraph/hedera-services/issues/2875 @HapiTest - private HapiSpec canUseMirrorAliasesForNonContractXfers() { + final HapiSpec canUseMirrorAliasesForNonContractXfers() { final AtomicReference ftId = new AtomicReference<>(); final AtomicReference nftId = new AtomicReference<>(); final AtomicReference partyId = new AtomicReference<>(); @@ -484,7 +484,7 @@ private HapiSpec canUseMirrorAliasesForNonContractXfers() { @SuppressWarnings("java:S5669") @HapiTest - private HapiSpec canUseEip1014AliasesForXfers() { + final HapiSpec canUseEip1014AliasesForXfers() { final var partyCreation2 = "partyCreation2"; final var counterCreation2 = "counterCreation2"; final var contract = "CreateDonor"; @@ -609,7 +609,7 @@ private HapiSpec canUseEip1014AliasesForXfers() { } @HapiTest - private HapiSpec cannotTransferFromImmutableAccounts() { + final HapiSpec cannotTransferFromImmutableAccounts() { final var contract = "PayableConstructor"; final var multiKey = "swiss"; @@ -708,7 +708,7 @@ private HapiSpec cannotTransferFromImmutableAccounts() { } @HapiTest // fees differ 44071858 vs 44071845 - private HapiSpec allowanceTransfersWithComplexTransfersWork() { + final HapiSpec allowanceTransfersWithComplexTransfersWork() { return defaultHapiSpec("AllowanceTransfersWithComplexTransfersWork", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(ADMIN_KEY), @@ -832,7 +832,7 @@ private HapiSpec allowanceTransfersWithComplexTransfersWork() { } @HapiTest - private HapiSpec allowanceTransfersWorkAsExpected() { + final HapiSpec allowanceTransfersWorkAsExpected() { return defaultHapiSpec("AllowanceTransfersWorkAsExpected", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(ADMIN_KEY), @@ -1070,7 +1070,7 @@ private HapiSpec allowanceTransfersWorkAsExpected() { } @HapiTest - private HapiSpec checksExpectedDecimalsForFungibleTokenTransferList() { + final HapiSpec checksExpectedDecimalsForFungibleTokenTransferList() { return defaultHapiSpec("checksExpectedDecimalsForFungibleTokenTransferList", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(MULTI_KEY), @@ -1115,7 +1115,7 @@ private HapiSpec checksExpectedDecimalsForFungibleTokenTransferList() { } @HapiTest - private HapiSpec nftTransfersCannotRepeatSerialNos() { + final HapiSpec nftTransfersCannotRepeatSerialNos() { final var aParty = "aParty"; final var bParty = "bParty"; final var cParty = "cParty"; @@ -1159,7 +1159,7 @@ private HapiSpec nftTransfersCannotRepeatSerialNos() { } @HapiTest - private HapiSpec nftSelfTransfersRejectedBothInPrecheckAndHandle() { + final HapiSpec nftSelfTransfersRejectedBothInPrecheckAndHandle() { final var owningParty = OWNING_PARTY; final var multipurpose = MULTI_KEY; final var nftType = "nftType"; @@ -1193,7 +1193,7 @@ private HapiSpec nftSelfTransfersRejectedBothInPrecheckAndHandle() { } @HapiTest - private HapiSpec hbarAndFungibleSelfTransfersRejectedBothInPrecheckAndHandle() { + final HapiSpec hbarAndFungibleSelfTransfersRejectedBothInPrecheckAndHandle() { final var uncheckedHbarTxn = "uncheckedHbarTxn"; final var uncheckedFtTxn = "uncheckedFtTxn"; @@ -1234,7 +1234,7 @@ private HapiSpec hbarAndFungibleSelfTransfersRejectedBothInPrecheckAndHandle() { } @HapiTest - private HapiSpec dissociatedRoyaltyCollectorsCanUseAutoAssociation() { + final HapiSpec dissociatedRoyaltyCollectorsCanUseAutoAssociation() { final var commonWithCustomFees = "commonWithCustomFees"; final var fractionalCollector = "fractionalCollector"; final var selfDenominatedCollector = "selfDenominatedCollector"; @@ -1293,7 +1293,7 @@ private HapiSpec dissociatedRoyaltyCollectorsCanUseAutoAssociation() { } @HapiTest - private HapiSpec royaltyCollectorsCanUseAutoAssociation() { + final HapiSpec royaltyCollectorsCanUseAutoAssociation() { final var uniqueWithRoyalty = "uniqueWithRoyalty"; final var firstFungible = "firstFungible"; final var secondFungible = "secondFungible"; @@ -1401,7 +1401,7 @@ private HapiSpec royaltyCollectorsCanUseAutoAssociation() { } @HapiTest - private HapiSpec royaltyCollectorsCannotUseAutoAssociationWithoutOpenSlots() { + final HapiSpec royaltyCollectorsCannotUseAutoAssociationWithoutOpenSlots() { final var uniqueWithRoyalty = "uniqueWithRoyalty"; final var someFungible = "firstFungible"; final var royaltyCollectorNoSlots = "royaltyCollectorNoSlots"; @@ -1453,7 +1453,7 @@ private HapiSpec royaltyCollectorsCannotUseAutoAssociationWithoutOpenSlots() { } @HapiTest - private HapiSpec autoAssociationRequiresOpenSlots() { + final HapiSpec autoAssociationRequiresOpenSlots() { final String tokenA = "tokenA"; final String tokenB = "tokenB"; final String firstUser = "firstUser"; @@ -1518,7 +1518,7 @@ private HapiSpec autoAssociationRequiresOpenSlots() { } @HapiTest - private HapiSpec baseCryptoTransferFeeChargedAsExpected() { + final HapiSpec baseCryptoTransferFeeChargedAsExpected() { final var expectedHbarXferPriceUsd = 0.0001; final var expectedHtsXferPriceUsd = 0.001; final var expectedNftXferPriceUsd = 0.001; @@ -1608,7 +1608,7 @@ private HapiSpec baseCryptoTransferFeeChargedAsExpected() { } @HapiTest - private HapiSpec okToSetInvalidPaymentHeaderForCostAnswer() { + final HapiSpec okToSetInvalidPaymentHeaderForCostAnswer() { return defaultHapiSpec("OkToSetInvalidPaymentHeaderForCostAnswer") .given(cryptoTransfer(tinyBarsFromTo(DEFAULT_PAYER, FUNDING, 1L)) .via("misc")) @@ -1620,7 +1620,7 @@ private HapiSpec okToSetInvalidPaymentHeaderForCostAnswer() { @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec tokenTransferFeesScaleAsExpected() { + final HapiSpec tokenTransferFeesScaleAsExpected() { return defaultHapiSpec("TokenTransferFeesScaleAsExpected", NONDETERMINISTIC_TRANSACTION_FEES) .given( cryptoCreate("a"), @@ -1760,7 +1760,7 @@ public static String sdec(double d, int numDecimals) { } @HapiTest - private HapiSpec transferToNonAccountEntitiesReturnsInvalidAccountId() { + final HapiSpec transferToNonAccountEntitiesReturnsInvalidAccountId() { AtomicReference invalidAccountId = new AtomicReference<>(); return defaultHapiSpec("TransferToNonAccountEntitiesReturnsInvalidAccountId", EXPECT_STREAMLINED_INGEST_RECORDS) @@ -1779,7 +1779,7 @@ private HapiSpec transferToNonAccountEntitiesReturnsInvalidAccountId() { } @HapiTest - private HapiSpec complexKeyAcctPaysForOwnTransfer() { + final HapiSpec complexKeyAcctPaysForOwnTransfer() { SigControl enoughUniqueSigs = SigControl.threshSigs( 2, SigControl.threshSigs(1, OFF, OFF, OFF, OFF, OFF, OFF, ON), @@ -1798,7 +1798,7 @@ private HapiSpec complexKeyAcctPaysForOwnTransfer() { } @HapiTest - private HapiSpec twoComplexKeysRequired() { + final HapiSpec twoComplexKeysRequired() { SigControl payerShape = threshOf(2, threshOf(1, 7), threshOf(3, 7)); SigControl receiverShape = SigControl.threshSigs(3, threshOf(2, 2), threshOf(3, 5), ON); @@ -1827,7 +1827,7 @@ private HapiSpec twoComplexKeysRequired() { } @HapiTest - private HapiSpec specialAccountsBalanceCheck() { + final HapiSpec specialAccountsBalanceCheck() { return defaultHapiSpec("SpecialAccountsBalanceCheck") .given(snapshotMode(FUZZY_MATCH_AGAINST_MONO_STREAMS)) .when() @@ -1837,7 +1837,7 @@ private HapiSpec specialAccountsBalanceCheck() { } @HapiTest - private HapiSpec transferWithMissingAccountGetsInvalidAccountId() { + final HapiSpec transferWithMissingAccountGetsInvalidAccountId() { return defaultHapiSpec("transferWithMissingAccountGetsInvalidAccountId", EXPECT_STREAMLINED_INGEST_RECORDS) .given(cryptoCreate(PAYEE_SIG_REQ).receiverSigRequired(true)) .when(cryptoTransfer(tinyBarsFromTo("1.2.3", PAYEE_SIG_REQ, 1_000L)) @@ -1847,7 +1847,7 @@ private HapiSpec transferWithMissingAccountGetsInvalidAccountId() { } @HapiTest - private HapiSpec vanillaTransferSucceeds() { + final HapiSpec vanillaTransferSucceeds() { long initialBalance = HapiSpecSetup.getDefaultInstance().defaultBalance(); return defaultHapiSpec("VanillaTransferSucceeds", FULLY_NONDETERMINISTIC) @@ -1878,7 +1878,7 @@ private HapiSpec vanillaTransferSucceeds() { } @HapiTest - private HapiSpec hapiTransferFromForNFTWithCustomFeesWithAllowance() { + final HapiSpec hapiTransferFromForNFTWithCustomFeesWithAllowance() { final var NFT_TOKEN_WITH_FIXED_HBAR_FEE = "nftTokenWithFixedHbarFee"; final var NFT_TOKEN_WITH_FIXED_TOKEN_FEE = "nftTokenWithFixedTokenFee"; final var NFT_TOKEN_WITH_ROYALTY_FEE_WITH_HBAR_FALLBACK = "nftTokenWithRoyaltyFeeWithHbarFallback"; @@ -2028,7 +2028,7 @@ private HapiSpec hapiTransferFromForNFTWithCustomFeesWithAllowance() { } @HapiTest - private HapiSpec hapiTransferFromForFungibleTokenWithCustomFeesWithAllowance() { + final HapiSpec hapiTransferFromForFungibleTokenWithCustomFeesWithAllowance() { final var FUNGIBLE_TOKEN_WITH_FIXED_HBAR_FEE = "fungibleTokenWithFixedHbarFee"; final var FUNGIBLE_TOKEN_WITH_FIXED_TOKEN_FEE = "fungibleTokenWithFixedTokenFee"; final var FUNGIBLE_TOKEN_WITH_FRACTIONAL_FEE = "fungibleTokenWithFractionalTokenFee"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoUpdateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoUpdateSuite.java index b36ac1667787..7f3fe3ac9bc9 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoUpdateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CryptoUpdateSuite.java @@ -141,7 +141,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec updateStakingFieldsWorks() { + final HapiSpec updateStakingFieldsWorks() { return defaultHapiSpec("updateStakingFieldsWorks", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(ADMIN_KEY), @@ -191,7 +191,7 @@ private HapiSpec updateStakingFieldsWorks() { } @HapiTest - private HapiSpec usdFeeAsExpectedCryptoUpdate() { + final HapiSpec usdFeeAsExpectedCryptoUpdate() { double autoAssocSlotPrice = 0.0018; double baseFee = 0.00022; double plusOneSlotFee = baseFee + autoAssocSlotPrice; @@ -246,7 +246,7 @@ private HapiSpec usdFeeAsExpectedCryptoUpdate() { } @HapiTest - private HapiSpec updateFailsWithOverlyLongLifetime() { + final HapiSpec updateFailsWithOverlyLongLifetime() { final var smallBuffer = 12_345L; final var excessiveExpiry = DEFAULT_MAX_LIFETIME + Instant.now().getEpochSecond() + smallBuffer; return defaultHapiSpec("UpdateFailsWithOverlyLongLifetime") @@ -256,7 +256,7 @@ private HapiSpec updateFailsWithOverlyLongLifetime() { } @HapiTest - private HapiSpec sysAccountKeyUpdateBySpecialWontNeedNewKeyTxnSign() { + final HapiSpec sysAccountKeyUpdateBySpecialWontNeedNewKeyTxnSign() { String sysAccount = "0.0.99"; String randomAccount = "randomAccount"; String firstKey = "firstKey"; @@ -282,7 +282,7 @@ private HapiSpec sysAccountKeyUpdateBySpecialWontNeedNewKeyTxnSign() { } @HapiTest - private HapiSpec canUpdateMemo() { + final HapiSpec canUpdateMemo() { String firstMemo = "First"; String secondMemo = "Second"; return defaultHapiSpec("CanUpdateMemo") @@ -298,7 +298,7 @@ private HapiSpec canUpdateMemo() { } @HapiTest - private HapiSpec updateWithUniqueSigs() { + final HapiSpec updateWithUniqueSigs() { return defaultHapiSpec("UpdateWithUniqueSigs", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(TARGET_KEY).shape(twoLevelThresh).labels(overlappingKeys), @@ -310,7 +310,7 @@ private HapiSpec updateWithUniqueSigs() { } @HapiTest - private HapiSpec updateWithOneEffectiveSig() { + final HapiSpec updateWithOneEffectiveSig() { KeyLabel oneUniqueKey = complex(complex("X", "X", "X", "X", "X", "X", "X"), complex("X", "X", "X", "X", "X", "X", "X")); SigControl singleSig = SigControl.threshSigs( @@ -330,7 +330,7 @@ private HapiSpec updateWithOneEffectiveSig() { } @HapiTest - private HapiSpec updateWithOverlappingSigs() { + final HapiSpec updateWithOverlappingSigs() { return defaultHapiSpec("UpdateWithOverlappingSigs", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(TARGET_KEY).shape(twoLevelThresh).labels(overlappingKeys), @@ -343,7 +343,7 @@ private HapiSpec updateWithOverlappingSigs() { } @HapiTest - private HapiSpec updateFailsWithContractKey() { + final HapiSpec updateFailsWithContractKey() { AtomicLong id = new AtomicLong(); final var CONTRACT = "Multipurpose"; return defaultHapiSpec( @@ -365,7 +365,7 @@ private HapiSpec updateFailsWithContractKey() { } @HapiTest - private HapiSpec updateFailsWithInsufficientSigs() { + final HapiSpec updateFailsWithInsufficientSigs() { return defaultHapiSpec("UpdateFailsWithInsufficientSigs", NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(TARGET_KEY).shape(twoLevelThresh).labels(overlappingKeys), @@ -378,7 +378,7 @@ private HapiSpec updateFailsWithInsufficientSigs() { } @HapiTest - private HapiSpec cannotSetThresholdNegative() { + final HapiSpec cannotSetThresholdNegative() { return defaultHapiSpec("CannotSetThresholdNegative", NONDETERMINISTIC_TRANSACTION_FEES) .given(cryptoCreate(TEST_ACCOUNT)) .when() @@ -386,7 +386,7 @@ private HapiSpec cannotSetThresholdNegative() { } @HapiTest - private HapiSpec updateFailsIfMissingSigs() { + final HapiSpec updateFailsIfMissingSigs() { SigControl origKeySigs = SigControl.threshSigs(3, ON, ON, SigControl.threshSigs(1, OFF, ON)); SigControl updKeySigs = SigControl.listSigs(ON, OFF, SigControl.threshSigs(1, ON, OFF, OFF, OFF)); @@ -405,7 +405,7 @@ private HapiSpec updateFailsIfMissingSigs() { } @HapiTest - private HapiSpec updateWithEmptyKeyFails() { + final HapiSpec updateWithEmptyKeyFails() { SigControl updKeySigs = threshOf(0, 0); return defaultHapiSpec("updateWithEmptyKeyFails", NONDETERMINISTIC_TRANSACTION_FEES) @@ -417,7 +417,7 @@ private HapiSpec updateWithEmptyKeyFails() { } @HapiTest - private HapiSpec updateMaxAutoAssociationsWorks() { + final HapiSpec updateMaxAutoAssociationsWorks() { final int maxAllowedAssociations = 5000; final int originalMax = 2; final int newBadMax = originalMax - 1; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CrytoCreateSuiteWithUTF8.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CrytoCreateSuiteWithUTF8.java index 74de46f86389..c656ee1beb21 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CrytoCreateSuiteWithUTF8.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/CrytoCreateSuiteWithUTF8.java @@ -55,7 +55,7 @@ private List positiveTests() { } @HapiTest - private HapiSpec createCryptoTxvWithUTF8Memo() { + final HapiSpec createCryptoTxvWithUTF8Memo() { return defaultHapiSpec("CreateCryptoTxvWithUTF8Memo") .given(cryptoCreate("UTF8MemoTestAccount").via("utf8MemoTxn")) .when() @@ -63,7 +63,7 @@ private HapiSpec createCryptoTxvWithUTF8Memo() { } @HapiTest - private HapiSpec cryptoCreateTxnCustomSpec() { + final HapiSpec cryptoCreateTxnCustomSpec() { return customHapiSpec("UTF8CustomSpecMemoTxn") .withProperties(Map.of("default.useMemoUTF8", utf8Mode.toString())) .given(cryptoCreate("UTF8CustomSpecTestAccount").via("utf8CustomSpecMemoTxn")) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HelloWorldSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HelloWorldSpec.java index 2e412352f6c8..11d14d0f3dba 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HelloWorldSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HelloWorldSpec.java @@ -51,7 +51,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec balancesChangeOnTransfer() { + final HapiSpec balancesChangeOnTransfer() { return defaultHapiSpec("BalancesChangeOnTransfer") .given( cryptoCreate("sponsor"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HollowAccountFinalizationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HollowAccountFinalizationSuite.java index 1bbfe118efd7..56abbd8b67ee 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HollowAccountFinalizationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/HollowAccountFinalizationSuite.java @@ -135,7 +135,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec hollowAccountCompletionWithTokenTransfer() { + final HapiSpec hollowAccountCompletionWithTokenTransfer() { final var fungibleToken = "fungibleToken"; final AtomicReference ftId = new AtomicReference<>(); final AtomicReference partyId = new AtomicReference<>(); @@ -230,7 +230,7 @@ private HapiSpec hollowAccountCompletionWithTokenTransfer() { } @HapiTest - private HapiSpec hollowAccountCompletionWithTokenAssociation() { + final HapiSpec hollowAccountCompletionWithTokenAssociation() { return defaultHapiSpec("HollowAccountCompletionWithTokenAssociation") .given( newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE), @@ -260,7 +260,7 @@ private HapiSpec hollowAccountCompletionWithTokenAssociation() { } @HapiTest - private HapiSpec hollowAccountFinalizationWhenAccountNotPresentInPreHandle() { + final HapiSpec hollowAccountFinalizationWhenAccountNotPresentInPreHandle() { final var ECDSA_2 = "ECDSA_2"; return defaultHapiSpec("hollowAccountFinalizationWhenAccountNotPresentInPreHandle") .given( @@ -303,7 +303,7 @@ private HapiSpec hollowAccountFinalizationWhenAccountNotPresentInPreHandle() { } @HapiTest - private HapiSpec hollowAccountFinalizationOccursOnlyOnceWhenMultipleFinalizationTensComeInAtTheSameTime() { + final HapiSpec hollowAccountFinalizationOccursOnlyOnceWhenMultipleFinalizationTensComeInAtTheSameTime() { final var ECDSA_2 = "ECDSA_2"; return defaultHapiSpec( "hollowAccountFinalizationOccursOnlyOnceWhenMultipleFinalizationTensComeInAtTheSameTime", @@ -358,7 +358,7 @@ private HapiSpec hollowAccountFinalizationOccursOnlyOnceWhenMultipleFinalization } @HapiTest - private HapiSpec hollowAccountCompletionWithCryptoTransfer() { + final HapiSpec hollowAccountCompletionWithCryptoTransfer() { return defaultHapiSpec("HollowAccountCompletionWithCryptoTransfer") .given(newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE)) .when(createHollowAccountFrom(SECP_256K1_SOURCE_KEY)) @@ -401,7 +401,7 @@ private HapiSpec hollowAccountCompletionWithCryptoTransfer() { } @HapiTest - private HapiSpec hollowAccountCompletionWhenHollowAccountSigRequiredInOtherReqSigs() { + final HapiSpec hollowAccountCompletionWhenHollowAccountSigRequiredInOtherReqSigs() { return defaultHapiSpec("hollowAccountCompletionWhenHollowAccountSigRequiredInOtherReqSigs") .given( newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE), @@ -452,7 +452,7 @@ private HapiSpec hollowAccountCompletionWhenHollowAccountSigRequiredInOtherReqSi } @HapiTest - private HapiSpec hollowAccountCompletionWithContractCreate() { + final HapiSpec hollowAccountCompletionWithContractCreate() { final var CONTRACT = "CreateTrivial"; return defaultHapiSpec("HollowAccountCompletionWithContractCreate") .given( @@ -482,7 +482,7 @@ private HapiSpec hollowAccountCompletionWithContractCreate() { } @HapiTest - private HapiSpec hollowAccountCompletionWithContractCall() { + final HapiSpec hollowAccountCompletionWithContractCall() { final var DEPOSIT_AMOUNT = 1000; return defaultHapiSpec( "HollowAccountCompletionWithContractCall", @@ -515,7 +515,7 @@ private HapiSpec hollowAccountCompletionWithContractCall() { } @HapiTest - private HapiSpec hollowAccountCompletionViaNonReqSigIsNotAllowed() { + final HapiSpec hollowAccountCompletionViaNonReqSigIsNotAllowed() { final var DEPOSIT_AMOUNT = 1000; return defaultHapiSpec("hollowAccountCompletionViaNonReqSigIsNotAllowed") .given( @@ -555,7 +555,7 @@ private HapiSpec hollowAccountCompletionViaNonReqSigIsNotAllowed() { } @HapiTest - private HapiSpec tooManyHollowAccountFinalizationsShouldFail() { + final HapiSpec tooManyHollowAccountFinalizationsShouldFail() { final var ECDSA_KEY_1 = "ECDSA_KEY_1"; final var ECDSA_KEY_2 = "ECDSA_KEY_2"; final var ECDSA_KEY_3 = "ECDSA_KEY_3"; @@ -614,7 +614,7 @@ private HapiSpec tooManyHollowAccountFinalizationsShouldFail() { } @HapiTest - private HapiSpec completedHollowAccountsTransfer() { + final HapiSpec completedHollowAccountsTransfer() { return defaultHapiSpec("CompletedHollowAccountsTransfer", SnapshotMatchMode.NONDETERMINISTIC_TRANSACTION_FEES) .given( newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE), @@ -703,7 +703,7 @@ private HapiSpec completedHollowAccountsTransfer() { } @HapiTest - private HapiSpec txnWith2CompletionsAndAnother2PrecedingChildRecords() { + final HapiSpec txnWith2CompletionsAndAnother2PrecedingChildRecords() { final var ecdsaKey2 = "ecdsaKey2"; final var recipientKey = "recipient"; final var recipientKey2 = "recipient2"; @@ -774,7 +774,7 @@ private HapiSpec txnWith2CompletionsAndAnother2PrecedingChildRecords() { } @HapiTest - private HapiSpec hollowPayerAndOtherReqSignerBothGetCompletedInASingleTransaction() { + final HapiSpec hollowPayerAndOtherReqSignerBothGetCompletedInASingleTransaction() { final var ecdsaKey2 = "ecdsaKey2"; final var recipientKey = "recipient"; return defaultHapiSpec( @@ -835,7 +835,7 @@ private HapiSpec hollowPayerAndOtherReqSignerBothGetCompletedInASingleTransactio } @HapiTest - private HapiSpec hollowAccountCompletionIsPersistedEvenIfTxnFails() { + final HapiSpec hollowAccountCompletionIsPersistedEvenIfTxnFails() { return defaultHapiSpec("hollowAccountCompletionIsPersistedEvenIfTxnFails") .given(newKeyNamed(SECP_256K1_SOURCE_KEY).shape(SECP_256K1_SHAPE)) .when(createHollowAccountFrom(SECP_256K1_SOURCE_KEY)) @@ -865,7 +865,7 @@ private HapiSpec hollowAccountCompletionIsPersistedEvenIfTxnFails() { } @HapiTest - private HapiSpec precompileTransferFromHollowAccountWithNeededSigFailsAndDoesNotFinalizeAccount() { + final HapiSpec precompileTransferFromHollowAccountWithNeededSigFailsAndDoesNotFinalizeAccount() { final var receiver = "receiver"; final var ft = "ft"; final String CONTRACT = "CryptoTransfer"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/MiscCryptoSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/MiscCryptoSuite.java index 9c7aadb2b4ed..4c824983cc54 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/MiscCryptoSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/MiscCryptoSuite.java @@ -75,7 +75,7 @@ private List negativeTests() { } @HapiTest - private HapiSpec sysAccountKeyUpdateBySpecialWontNeedNewKeyTxnSign() { + final HapiSpec sysAccountKeyUpdateBySpecialWontNeedNewKeyTxnSign() { String sysAccount = "0.0.977"; String randomAccountA = "randomAccountA"; String randomAccountB = "randomAccountB"; @@ -106,7 +106,7 @@ private HapiSpec sysAccountKeyUpdateBySpecialWontNeedNewKeyTxnSign() { } @HapiTest - private HapiSpec reduceTransferFee() { + final HapiSpec reduceTransferFee() { final long REDUCED_NODE_FEE = 2L; final long REDUCED_NETWORK_FEE = 3L; final long REDUCED_SERVICE_FEE = 3L; @@ -131,7 +131,7 @@ private HapiSpec reduceTransferFee() { } @HapiTest - private HapiSpec getsGenesisBalance() { + final HapiSpec getsGenesisBalance() { return defaultHapiSpec("GetsGenesisBalance") .given() .when() @@ -139,7 +139,7 @@ private HapiSpec getsGenesisBalance() { } @HapiTest - private HapiSpec transferChangesBalance() { + final HapiSpec transferChangesBalance() { return defaultHapiSpec("TransferChangesBalance") .given(cryptoCreate("newPayee").balance(0L)) .when(cryptoTransfer(tinyBarsFromTo(GENESIS, "newPayee", 1_000_000_000L))) @@ -147,7 +147,7 @@ private HapiSpec transferChangesBalance() { } @HapiTest - private HapiSpec updateWithOutOfDateKeyFails() { + final HapiSpec updateWithOutOfDateKeyFails() { return defaultHapiSpec("UpdateWithOutOfDateKeyFails") .given( newKeyNamed("originalKey"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NewAccountRecordExists.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NewAccountRecordExists.java index 65543de2a120..c6ed3398ebb6 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NewAccountRecordExists.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NewAccountRecordExists.java @@ -51,7 +51,7 @@ public List getSpecsInSuite() { return List.of(newAccountIsReflectedInRecordStream(), newAccountIsReflectedInRecordStreamV2()); } - private HapiSpec newAccountIsReflectedInRecordStream() { + final HapiSpec newAccountIsReflectedInRecordStream() { final var balance = 1_234_567L; final var novelKey = "novelKey"; final var memo = "It was the best of times"; @@ -74,7 +74,7 @@ private HapiSpec newAccountIsReflectedInRecordStream() { new AccountExistenceValidator(account, consensusTime.get()), Duration.ofMillis(2_100)))); } - private HapiSpec newAccountIsReflectedInRecordStreamV2() { + final HapiSpec newAccountIsReflectedInRecordStreamV2() { final var balance = 1_234_567L; final var memo = "It was the best of times"; final var account = "novel"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NewContractRecordExists.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NewContractRecordExists.java index 740be524b0b3..61aee1ef2990 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NewContractRecordExists.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NewContractRecordExists.java @@ -48,7 +48,7 @@ public List getSpecsInSuite() { return List.of(newContractIsReflectedInRecordStream()); } - private HapiSpec newContractIsReflectedInRecordStream() { + final HapiSpec newContractIsReflectedInRecordStream() { final var creation = "creation"; final AtomicReference consensusTime = new AtomicReference<>(); return defaultHapiSpec(EMPTY_CONTRACT) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NftTransferSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NftTransferSuite.java index 9e07de11b703..bbe094220a9d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NftTransferSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/NftTransferSuite.java @@ -183,7 +183,7 @@ private static HapiSpecOperation setupNftTest() { return blockingOrder(createBasicAccounts(), createAccountsAndNfts()); } - private HapiSpec transferNfts() { + final HapiSpec transferNfts() { return defaultHapiSpec("TransferNfts") .given(setupNftTest(), transferInitial()) .when(seqFor(0, NUM_ROUNDS, NftTransferSuite::transferRound)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java index 5562d7d394d1..b737e0af67be 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/QueryPaymentSuite.java @@ -74,7 +74,7 @@ private List queryPaymentTests() { * 3. Transaction payer is not involved in transfers for query payment to node and one or more have less balance */ @HapiTest - private HapiSpec queryPaymentsFailsWithInsufficientFunds() { + final HapiSpec queryPaymentsFailsWithInsufficientFunds() { return defaultHapiSpec("queryPaymentsFailsWithInsufficientFunds") .given( cryptoCreate("a").balance(500_000_000L), @@ -110,7 +110,7 @@ private HapiSpec queryPaymentsFailsWithInsufficientFunds() { * 3. Transaction payer is not involved in transfers for query payment to node and all payers have enough balance */ @HapiTest - private HapiSpec queryPaymentsMultiBeneficiarySucceeds() { + final HapiSpec queryPaymentsMultiBeneficiarySucceeds() { return defaultHapiSpec("queryPaymentsMultiBeneficiarySucceeds") .given( cryptoCreate("a").balance(1_234L), @@ -140,7 +140,7 @@ private HapiSpec queryPaymentsMultiBeneficiarySucceeds() { // Check if multiple payers or single payer pay amount to node @HapiTest - private HapiSpec queryPaymentsSingleBeneficiaryChecked() { + final HapiSpec queryPaymentsSingleBeneficiaryChecked() { return defaultHapiSpec("queryPaymentsSingleBeneficiaryChecked") .given( cryptoCreate("a").balance(500_000_000L), @@ -162,7 +162,7 @@ private HapiSpec queryPaymentsSingleBeneficiaryChecked() { // Check if payment is not done to node @HapiTest - private HapiSpec queryPaymentsNotToNodeFails() { + final HapiSpec queryPaymentsNotToNodeFails() { return defaultHapiSpec("queryPaymentsNotToNodeFails") .given( cryptoCreate("a").balance(500_000_000L), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/RandomOps.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/RandomOps.java index ffd39161643a..a1522935dfda 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/RandomOps.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/RandomOps.java @@ -65,7 +65,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec getAccountDetailsDemo() { + final HapiSpec getAccountDetailsDemo() { final String owner = "owner"; final String spender = "spender"; final String token = "token"; @@ -138,7 +138,7 @@ private HapiSpec getAccountDetailsDemo() { } @HapiTest - private HapiSpec retryLimitDemo() { + final HapiSpec retryLimitDemo() { return defaultHapiSpec("RetryLimitDemo") .given() .when() @@ -151,7 +151,7 @@ private HapiSpec retryLimitDemo() { } @HapiTest - private HapiSpec freezeDemo() { + final HapiSpec freezeDemo() { return customHapiSpec("FreezeDemo") .withProperties(Map.of("nodes", "127.0.0.1:50213:0.0.3,127.0.0.1:50214:0.0.4,127.0.0.1:50215:0.0.5")) .given() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/TxnReceiptRegression.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/TxnReceiptRegression.java index a1cbe0a2036d..d9d3b7c09090 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/TxnReceiptRegression.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/TxnReceiptRegression.java @@ -68,7 +68,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec returnsInvalidForUnspecifiedTxnId() { + final HapiSpec returnsInvalidForUnspecifiedTxnId() { return defaultHapiSpec("ReturnsInvalidForUnspecifiedTxnId") .given() .when() @@ -76,7 +76,7 @@ private HapiSpec returnsInvalidForUnspecifiedTxnId() { } @HapiTest - private HapiSpec returnsNotSupportedForMissingOp() { + final HapiSpec returnsNotSupportedForMissingOp() { return defaultHapiSpec("ReturnsNotSupportedForMissingOp") .given(cryptoCreate("misc").via("success").balance(1_000L)) .when() @@ -84,7 +84,7 @@ private HapiSpec returnsNotSupportedForMissingOp() { } // FUTURE: revisit this test, which isn't passing in modular or mono code - private HapiSpec receiptUnavailableAfterCacheTtl() { + final HapiSpec receiptUnavailableAfterCacheTtl() { return defaultHapiSpec("ReceiptUnavailableAfterCacheTtl") .given(cryptoCreate("misc").via("success").balance(1_000L)) .when(sleepFor(200_000L)) @@ -92,7 +92,7 @@ private HapiSpec receiptUnavailableAfterCacheTtl() { } @HapiTest - private HapiSpec receiptUnknownBeforeConsensus() { + final HapiSpec receiptUnknownBeforeConsensus() { return defaultHapiSpec("ReceiptUnknownBeforeConsensus") .given() .when() @@ -102,7 +102,7 @@ private HapiSpec receiptUnknownBeforeConsensus() { } @HapiTest - private HapiSpec receiptAvailableWithinCacheTtl() { + final HapiSpec receiptAvailableWithinCacheTtl() { return defaultHapiSpec("ReceiptAvailableWithinCacheTtl") .given(cryptoCreate("misc").via("success").balance(1_000L)) .when() @@ -110,7 +110,7 @@ private HapiSpec receiptAvailableWithinCacheTtl() { } @HapiTest - private HapiSpec receiptUnavailableIfRejectedInPrecheck() { + final HapiSpec receiptUnavailableIfRejectedInPrecheck() { return defaultHapiSpec("ReceiptUnavailableIfRejectedInPrecheck") .given(cryptoCreate("misc").balance(1_000L)) .when(cryptoCreate("nope") @@ -121,7 +121,7 @@ private HapiSpec receiptUnavailableIfRejectedInPrecheck() { } @HapiTest - private HapiSpec receiptNotFoundOnUnknownTransactionID() { + final HapiSpec receiptNotFoundOnUnknownTransactionID() { return defaultHapiSpec("receiptNotFoundOnUnknownTransactionID") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/TxnRecordRegression.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/TxnRecordRegression.java index ee688a849b5c..7462bc19a4e7 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/TxnRecordRegression.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/TxnRecordRegression.java @@ -75,7 +75,7 @@ public List getSpecsInSuite() { } // FUTURE: revisit this test, which isn't passing in modular or mono code (even with a 3 second TTL) - private HapiSpec recordAvailableInPayerState() { + final HapiSpec recordAvailableInPayerState() { return defaultHapiSpec("RecordAvailableInPayerState") .given( cryptoCreate("stingyPayer").sendThreshold(1L), @@ -89,7 +89,7 @@ private HapiSpec recordAvailableInPayerState() { } // FUTURE: revisit this test, which isn't passing in modular or mono code (even with a 3 second TTL) - private HapiSpec deletedAccountRecordsUnavailableAfterTtl() { + final HapiSpec deletedAccountRecordsUnavailableAfterTtl() { return defaultHapiSpec("DeletedAccountRecordsUnavailableAfterTtl") .given( cryptoCreate("lowThreshPayer").sendThreshold(1L), @@ -103,7 +103,7 @@ private HapiSpec deletedAccountRecordsUnavailableAfterTtl() { } @HapiTest - private HapiSpec returnsInvalidForUnspecifiedTxnId() { + final HapiSpec returnsInvalidForUnspecifiedTxnId() { return defaultHapiSpec("ReturnsInvalidForUnspecifiedTxnId") .given() .when() @@ -111,7 +111,7 @@ private HapiSpec returnsInvalidForUnspecifiedTxnId() { } @HapiTest - private HapiSpec recordNotFoundIfNotInPayerState() { + final HapiSpec recordNotFoundIfNotInPayerState() { return defaultHapiSpec("RecordNotFoundIfNotInPayerState") .given( cryptoCreate("misc").via("success"), @@ -121,7 +121,7 @@ private HapiSpec recordNotFoundIfNotInPayerState() { } @HapiTest - private HapiSpec recordUnavailableBeforeConsensus() { + final HapiSpec recordUnavailableBeforeConsensus() { return defaultHapiSpec("RecordUnavailableBeforeConsensus") .given() .when() @@ -131,7 +131,7 @@ private HapiSpec recordUnavailableBeforeConsensus() { } // FUTURE: revisit this test, which isn't passing in modular or mono code (even with a 3 second TTL) - private HapiSpec recordUnavailableIfRejectedInPrecheck() { + final HapiSpec recordUnavailableIfRejectedInPrecheck() { return defaultHapiSpec("RecordUnavailableIfRejectedInPrecheck") .given(usableTxnIdNamed("failingTxn"), cryptoCreate("misc").balance(1_000L)) .when(cryptoCreate("nope") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/UnsupportedQueriesRegression.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/UnsupportedQueriesRegression.java index 51a8487f1f35..1af817d821aa 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/UnsupportedQueriesRegression.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/UnsupportedQueriesRegression.java @@ -56,7 +56,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec verifyUnsupportedOps() { + final HapiSpec verifyUnsupportedOps() { return defaultHapiSpec("VerifyUnsupportedOps") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/staking/StakingSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/staking/StakingSuite.java index f427182c7b48..a40d186924fe 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/staking/StakingSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/staking/StakingSuite.java @@ -128,7 +128,7 @@ public List getSpecsInSuite() { * received the expected rewards (all zero). */ @HapiTest - private HapiSpec zeroStakeAccountsHaveMetadataResetOnFirstDayTheyReceiveFunds() { + final HapiSpec zeroStakeAccountsHaveMetadataResetOnFirstDayTheyReceiveFunds() { final var zeroStakeAccount = "zeroStakeAccount"; final var numZeroStakeAccounts = 10; final var stakePeriodMins = 1L; @@ -180,7 +180,7 @@ private HapiSpec zeroStakeAccountsHaveMetadataResetOnFirstDayTheyReceiveFunds() * end of a staking period, only to receive it back shortly after that period starts. */ @HapiTest - private HapiSpec stakeIsManagedCorrectlyInTxnsAroundPeriodBoundaries() { + final HapiSpec stakeIsManagedCorrectlyInTxnsAroundPeriodBoundaries() { final var alice = "alice"; final var baldwin = "baldwin"; final var stakePeriodMins = 1L; @@ -262,7 +262,7 @@ private HapiSpec stakeIsManagedCorrectlyInTxnsAroundPeriodBoundaries() { * @return the spec described above */ @HapiTest - private HapiSpec autoRenewalsCanTriggerStakingRewards() { + final HapiSpec autoRenewalsCanTriggerStakingRewards() { final var initBalance = ONE_HBAR * 1000; final var minimalLifetime = 3; final var creation = "creation"; @@ -292,7 +292,7 @@ private HapiSpec autoRenewalsCanTriggerStakingRewards() { } @HapiTest - private HapiSpec canBeRewardedWithoutMinStakeIfSoConfigured() { + final HapiSpec canBeRewardedWithoutMinStakeIfSoConfigured() { final var patientlyWaiting = "patientlyWaiting"; return defaultHapiSpec("CanBeRewardedWithoutMinStakeIfSoConfigured") @@ -323,7 +323,7 @@ private HapiSpec canBeRewardedWithoutMinStakeIfSoConfigured() { .then(getAccountBalance(patientlyWaiting).logged()); } - private HapiSpec secondOrderRewardSituationsWork() { + final HapiSpec secondOrderRewardSituationsWork() { final long totalStakeStartCase1 = 3 * ONE_HUNDRED_HBARS; final long expectedRewardRate = Math.max(0, Math.min(10 * ONE_HBAR, SOME_REWARD_RATE)); final long rewardSumHistoryCase1 = @@ -364,7 +364,7 @@ private HapiSpec secondOrderRewardSituationsWork() { .logged()); } - private HapiSpec evenOneTinybarChangeInIndirectStakingAccountTriggersStakeeRewardSituation() { + final HapiSpec evenOneTinybarChangeInIndirectStakingAccountTriggersStakeeRewardSituation() { return defaultHapiSpec("EvenOneTinybarChangeInIndirectStakingAccountTriggersStakeeRewardSituation") .given( overriding(STAKING_START_THRESHOLD, "" + 10 * ONE_HBAR), @@ -382,7 +382,7 @@ private HapiSpec evenOneTinybarChangeInIndirectStakingAccountTriggersStakeeRewar getTxnRecord(FIRST_TRANSFER).hasPaidStakingRewardsCount(1)); } - private HapiSpec zeroRewardEarnedWithZeroWholeHbarsStillSetsSASOLARP() { + final HapiSpec zeroRewardEarnedWithZeroWholeHbarsStillSetsSASOLARP() { return defaultHapiSpec("ZeroRewardEarnedWithZeroWholeHbarsStillSetsSASOLARP") .given( overriding(STAKING_START_THRESHOLD, "" + 10 * ONE_HBAR), @@ -403,7 +403,7 @@ private HapiSpec zeroRewardEarnedWithZeroWholeHbarsStillSetsSASOLARP() { getTxnRecord(FIRST_TRANSFER).hasPaidStakingRewardsCount(1)); } - private HapiSpec losingEvenAZeroBalanceStakerTriggersStakeeRewardSituation() { + final HapiSpec losingEvenAZeroBalanceStakerTriggersStakeeRewardSituation() { return defaultHapiSpec("LosingEvenAZeroBalanceStakerTriggersStakeeRewardSituation") .given( overriding(STAKING_START_THRESHOLD, "" + 10 * ONE_HBAR), @@ -421,7 +421,7 @@ private HapiSpec losingEvenAZeroBalanceStakerTriggersStakeeRewardSituation() { getTxnRecord(FIRST_TRANSFER).hasPaidStakingRewardsCount(1)); } - private HapiSpec getInfoQueriesReturnsPendingRewards() { + final HapiSpec getInfoQueriesReturnsPendingRewards() { final long expectedTotalStakedRewardStart = ONE_HUNDRED_HBARS + ONE_HUNDRED_HBARS; final long accountTotalStake = ONE_HUNDRED_HBARS; final long expectedRewardRate = Math.max(0, Math.min(10 * ONE_HBAR, SOME_REWARD_RATE)); @@ -475,7 +475,7 @@ private HapiSpec getInfoQueriesReturnsPendingRewards() { .hasPaidStakingRewards(List.of(Pair.of(PAYABLE_CONTRACT, expectedPendingReward)))); } - private HapiSpec rewardPaymentsNotRepeatedInSamePeriod() { + final HapiSpec rewardPaymentsNotRepeatedInSamePeriod() { return defaultHapiSpec("rewardPaymentsNotRepeatedInSamePeriod") .given( overriding(STAKING_START_THRESHOLD, "" + 10 * ONE_HBAR), @@ -548,7 +548,7 @@ private HapiSpec rewardPaymentsNotRepeatedInSamePeriod() { .hasPaidStakingRewards(List.of())); } - private HapiSpec rewardsWorkAsExpectedWithReceiverSigRequired() { + final HapiSpec rewardsWorkAsExpectedWithReceiverSigRequired() { final long expectedTotalStakedRewardStart = ONE_HUNDRED_HBARS + ONE_HBAR; final long expectedRewardRate = Math.max(0, Math.min(10 * ONE_HBAR, SOME_REWARD_RATE)); final long expectedRewardSumHistory = @@ -604,7 +604,7 @@ private HapiSpec rewardsWorkAsExpectedWithReceiverSigRequired() { .logged()); } - private HapiSpec rewardsWorkAsExpected() { + final HapiSpec rewardsWorkAsExpected() { final long expectedTotalStakedRewardStart = ONE_HUNDRED_HBARS + ONE_HBAR; final long expectedRewardRate = Math.max(0, Math.min(10 * ONE_HBAR, SOME_REWARD_RATE)); final long expectedRewardSumHistory = @@ -669,7 +669,7 @@ private HapiSpec rewardsWorkAsExpected() { .hasPaidStakingRewards(List.of())); } - private HapiSpec endOfStakingPeriodRecTest() { + final HapiSpec endOfStakingPeriodRecTest() { return defaultHapiSpec("EndOfStakingPeriodRecTest") .given( cryptoCreate("a1").balance(24000 * ONE_MILLION_HBARS).stakedNodeId(0), @@ -703,7 +703,7 @@ private HapiSpec endOfStakingPeriodRecTest() { } @HapiTest - private HapiSpec rewardsOfDeletedAreRedirectedToBeneficiary() { + final HapiSpec rewardsOfDeletedAreRedirectedToBeneficiary() { final var bob = "bob"; final var deletion = "deletion"; return defaultHapiSpec("RewardsOfDeletedAreRedirectedToBeneficiary") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/staking/StartStaking.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/staking/StartStaking.java index 14e91a6891b5..43f1a1e6c57b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/staking/StartStaking.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/crypto/staking/StartStaking.java @@ -143,7 +143,7 @@ public List getSpecsInSuite() { return List.of(startStakingAndExportCreatedStakers()); } - private HapiSpec startStakingAndExportCreatedStakers() { + final HapiSpec startStakingAndExportCreatedStakers() { final var baseStakerName = "baseStaker"; return customHapiSpec("StartStakingAndExportCreatedStakers") .withProperties(Map.of( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/ethereum/EthereumV1SecurityModelSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/ethereum/EthereumV1SecurityModelSuite.java index be528ba8e15d..376657d3c632 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/ethereum/EthereumV1SecurityModelSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/ethereum/EthereumV1SecurityModelSuite.java @@ -104,7 +104,7 @@ public List getSpecsInSuite() { setApproveForAllUsingLocalNodeSetupPasses()); } - private HapiSpec setApproveForAllUsingLocalNodeSetupPasses() { + final HapiSpec setApproveForAllUsingLocalNodeSetupPasses() { final AtomicReference spenderAutoCreatedAccountId = new AtomicReference<>(); final AtomicReference tokenCreateContractID = new AtomicReference<>(); final AtomicReference erc721ContractID = new AtomicReference<>(); @@ -310,7 +310,7 @@ private HapiSpec setApproveForAllUsingLocalNodeSetupPasses() { .then(withOpContext((spec, opLog) -> {})); } - private HapiSpec etx012PrecompileCallSucceedsWhenNeededSignatureInEthTxn() { + final HapiSpec etx012PrecompileCallSucceedsWhenNeededSignatureInEthTxn() { final AtomicReference fungible = new AtomicReference<>(); final String fungibleToken = TOKEN; final String mintTxn = MINT_TXN; @@ -365,7 +365,7 @@ HELLO_WORLD_MINT_CONTRACT, asHeadlongAddress(asAddress(fungible.get())))), spec.registry().getBytes(ETH_HASH_KEY))))))); } - private HapiSpec etx013PrecompileCallSucceedsWhenNeededSignatureInHederaTxn() { + final HapiSpec etx013PrecompileCallSucceedsWhenNeededSignatureInHederaTxn() { final AtomicReference fungible = new AtomicReference<>(); final String fungibleToken = TOKEN; final String mintTxn = MINT_TXN; @@ -423,7 +423,7 @@ HELLO_WORLD_MINT_CONTRACT, asHeadlongAddress(asAddress(fungible.get())))), spec.registry().getBytes(ETH_HASH_KEY))))))); } - private HapiSpec etx007FungibleTokenCreateWithFeesHappyPath() { + final HapiSpec etx007FungibleTokenCreateWithFeesHappyPath() { final var createdTokenNum = new AtomicLong(); final var feeCollectorAndAutoRenew = "feeCollectorAndAutoRenew"; final var contract = "TokenCreateContract"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/AllBaseOpFeesSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/AllBaseOpFeesSuite.java index 5c5882297edf..e3c2e07cd893 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/AllBaseOpFeesSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/AllBaseOpFeesSuite.java @@ -90,7 +90,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec baseNftMintOperationIsChargedExpectedFee() { + final HapiSpec baseNftMintOperationIsChargedExpectedFee() { final var standard100ByteMetadata = ByteString.copyFromUtf8( "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"); @@ -113,7 +113,7 @@ private HapiSpec baseNftMintOperationIsChargedExpectedFee() { } @HapiTest - private HapiSpec NftMintsScaleLinearlyBasedOnNumberOfSerialNumbers() { + final HapiSpec NftMintsScaleLinearlyBasedOnNumberOfSerialNumbers() { final var expectedFee = 10 * EXPECTED_NFT_MINT_PRICE_USD; final var standard100ByteMetadata = ByteString.copyFromUtf8( "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"); @@ -149,7 +149,7 @@ private HapiSpec NftMintsScaleLinearlyBasedOnNumberOfSerialNumbers() { } @HapiTest - private HapiSpec NftMintsScaleLinearlyBasedOnNumberOfSignatures() { + final HapiSpec NftMintsScaleLinearlyBasedOnNumberOfSignatures() { final var numOfSigs = 10; final var extraSigPrice = 0.0006016996; final var expectedFee = EXPECTED_NFT_MINT_PRICE_USD + ((numOfSigs - 1) * extraSigPrice); @@ -175,7 +175,7 @@ private HapiSpec NftMintsScaleLinearlyBasedOnNumberOfSignatures() { } @HapiTest - private HapiSpec baseNftWipeOperationIsChargedExpectedFee() { + final HapiSpec baseNftWipeOperationIsChargedExpectedFee() { return defaultHapiSpec("BaseUniqueWipeOperationIsChargedExpectedFee") .given( newKeyNamed(SUPPLY_KEY), @@ -201,7 +201,7 @@ private HapiSpec baseNftWipeOperationIsChargedExpectedFee() { } @HapiTest - private HapiSpec baseNftBurnOperationIsChargedExpectedFee() { + final HapiSpec baseNftBurnOperationIsChargedExpectedFee() { return defaultHapiSpec("BaseUniqueBurnOperationIsChargedExpectedFee") .given( newKeyNamed(SUPPLY_KEY), @@ -222,7 +222,7 @@ private HapiSpec baseNftBurnOperationIsChargedExpectedFee() { } @HapiTest - private HapiSpec baseNftFreezeUnfreezeChargedAsExpected() { + final HapiSpec baseNftFreezeUnfreezeChargedAsExpected() { return defaultHapiSpec("baseNftFreezeUnfreezeChargedAsExpected") .given( newKeyNamed(TREASURE_KEY), @@ -260,7 +260,7 @@ private HapiSpec baseNftFreezeUnfreezeChargedAsExpected() { } @HapiTest - private HapiSpec baseCommonFreezeUnfreezeChargedAsExpected() { + final HapiSpec baseCommonFreezeUnfreezeChargedAsExpected() { return defaultHapiSpec("baseCommonFreezeUnfreezeChargedAsExpected") .given( newKeyNamed(TREASURE_KEY), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/CongestionPricingSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/CongestionPricingSuite.java index 27e214c6a598..9e936cf1c7d8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/CongestionPricingSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/CongestionPricingSuite.java @@ -69,7 +69,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec canUpdateMultipliersDynamically() { + final HapiSpec canUpdateMultipliersDynamically() { var artificialLimits = protoDefsFromResource("testSystemFiles/artificial-limits-congestion.json"); var defaultThrottles = protoDefsFromResource("testSystemFiles/throttles-dev.json"); var contract = "Multipurpose"; @@ -157,7 +157,7 @@ private HapiSpec canUpdateMultipliersDynamically() { } @HapiTest - private HapiSpec canUpdateMultipliersDynamically2() { + final HapiSpec canUpdateMultipliersDynamically2() { var artificialLimits = protoDefsFromResource("testSystemFiles/artificial-limits-congestion.json"); var defaultThrottles = protoDefsFromResource("testSystemFiles/throttles-dev.json"); String tmpMinCongestionPeriod = "1"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/OverlappingKeysSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/OverlappingKeysSuite.java index 0fef2975ce17..3d41510ca1c5 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/OverlappingKeysSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/OverlappingKeysSuite.java @@ -61,7 +61,7 @@ private List negativeTests() { } @HapiTest - private HapiSpec feeCalcUsesNumPayerKeys() { + final HapiSpec feeCalcUsesNumPayerKeys() { SigControl SHAPE = threshSigs(2, threshSigs(2, ANY, ANY, ANY), threshSigs(2, ANY, ANY, ANY)); KeyLabel ONE_UNIQUE_KEY = complex(complex("X", "X", "X"), complex("X", "X", "X")); SigControl SIGN_ONCE = threshSigs(2, threshSigs(3, ON, OFF, OFF), threshSigs(3, OFF, OFF, OFF)); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/SpecialAccountsAreExempted.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/SpecialAccountsAreExempted.java index 0db5819199b0..028ae34e310e 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/SpecialAccountsAreExempted.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/fees/SpecialAccountsAreExempted.java @@ -59,7 +59,7 @@ public List getSpecsInSuite() { @LeakyFeeSchedule @HapiTest - private HapiSpec feeScheduleControlAccountIsntCharged() { + final HapiSpec feeScheduleControlAccountIsntCharged() { ResponseCodeEnum[] acceptable = {SUCCESS, FEE_SCHEDULE_FILE_PART_UPLOADED}; return defaultHapiSpec("FeeScheduleControlAccountIsntCharged") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/DiverseStateCreation.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/DiverseStateCreation.java index 9a73ce16b1d6..232dda7fb11f 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/DiverseStateCreation.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/DiverseStateCreation.java @@ -111,7 +111,7 @@ public List getSpecsInSuite() { return List.of(createDiverseState()); } - private HapiSpec createDiverseState() { + final HapiSpec createDiverseState() { final KeyShape SMALL_SHAPE = listOf(threshOf(1, 3)); final KeyShape MEDIUM_SHAPE = listOf(SIMPLE, threshOf(2, 3)); final KeyShape LARGE_SHAPE = listOf( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/DiverseStateValidation.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/DiverseStateValidation.java index b0961e274f31..9c9342eb574e 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/DiverseStateValidation.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/DiverseStateValidation.java @@ -91,7 +91,7 @@ public List getSpecsInSuite() { } @SuppressWarnings("unchecked") - private HapiSpec validateDiverseState() { + final HapiSpec validateDiverseState() { return defaultHapiSpec("ValidateDiverseState") .given(withOpContext((spec, opLog) -> { final var om = new ObjectMapper(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ExchangeRateControlSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ExchangeRateControlSuite.java index b2a135016f41..087a27b40a2d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ExchangeRateControlSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ExchangeRateControlSuite.java @@ -64,7 +64,7 @@ private List negativeTests() { .contents(spec -> spec.ratesProvider().rateSetWith(1, 12).toByteString()); @HapiTest - private HapiSpec acct57CanMakeSmallChanges() { + final HapiSpec acct57CanMakeSmallChanges() { return defaultHapiSpec("Acct57CanMakeSmallChanges") .given( resetRatesOp, @@ -85,7 +85,7 @@ private HapiSpec acct57CanMakeSmallChanges() { } @HapiTest - private HapiSpec midnightRateChangesWhenAcct50UpdatesFile112() { + final HapiSpec midnightRateChangesWhenAcct50UpdatesFile112() { return defaultHapiSpec("MidnightRateChangesWhenAcct50UpdatesFile112") .given( resetRatesOp, @@ -139,7 +139,7 @@ private HapiSpec midnightRateChangesWhenAcct50UpdatesFile112() { } @HapiTest - private HapiSpec anonCantUpdateRates() { + final HapiSpec anonCantUpdateRates() { return defaultHapiSpec("AnonCantUpdateRates") .given(resetRatesOp, cryptoCreate("randomAccount")) .when() @@ -150,7 +150,7 @@ private HapiSpec anonCantUpdateRates() { } @HapiTest - private HapiSpec acct57CantMakeLargeChanges() { + final HapiSpec acct57CantMakeLargeChanges() { return defaultHapiSpec("Acct57CantMakeLargeChanges") .given( resetRatesOp, diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FetchSystemFiles.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FetchSystemFiles.java index 51e6d580bcfb..cbbb8c47d581 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FetchSystemFiles.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FetchSystemFiles.java @@ -51,7 +51,7 @@ public List getSpecsInSuite() { /** Fetches the system files from a running network and saves them to the local file system. */ @HapiTest - private HapiSpec fetchFiles() { + final HapiSpec fetchFiles() { return customHapiSpec("FetchFiles") .withProperties(Map.of( "fees.useFixedOffer", "true", diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileAppendSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileAppendSuite.java index e1ba387f2a01..d12a047bfd6f 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileAppendSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileAppendSuite.java @@ -86,7 +86,7 @@ public HapiSpec baseOpsHaveExpectedPrices() { } @HapiTest - private HapiSpec vanillaAppendSucceeds() { + final HapiSpec vanillaAppendSucceeds() { final byte[] first4K = randomUtf8Bytes(BYTES_4K); final byte[] next4k = randomUtf8Bytes(BYTES_4K); final byte[] all8k = new byte[2 * BYTES_4K]; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileCreateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileCreateSuite.java index bb2f9feadfef..02019f4c2ce8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileCreateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileCreateSuite.java @@ -81,7 +81,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec exchangeRateControlAccountIsntCharged() { + final HapiSpec exchangeRateControlAccountIsntCharged() { return defaultHapiSpec("ExchangeRateControlAccountIsntCharged") .given( cryptoTransfer(tinyBarsFromTo(GENESIS, EXCHANGE_RATE_CONTROL, 1_000_000_000_000L)), @@ -94,7 +94,7 @@ private HapiSpec exchangeRateControlAccountIsntCharged() { } @HapiTest - private HapiSpec createFailsWithExcessiveLifetime() { + final HapiSpec createFailsWithExcessiveLifetime() { return defaultHapiSpec("CreateFailsWithExcessiveLifetime") .given() .when() @@ -104,7 +104,7 @@ private HapiSpec createFailsWithExcessiveLifetime() { } @HapiTest - private HapiSpec createWithMemoWorks() { + final HapiSpec createWithMemoWorks() { String memo = "Really quite something!"; return defaultHapiSpec("createWithMemoWorks") @@ -117,7 +117,7 @@ private HapiSpec createWithMemoWorks() { } @HapiTest - private HapiSpec createFailsWithMissingSigs() { + final HapiSpec createFailsWithMissingSigs() { KeyShape shape = listOf(SIMPLE, threshOf(2, 3), threshOf(1, 3)); SigControl validSig = shape.signedWith(sigs(ON, sigs(ON, ON, OFF), sigs(OFF, OFF, ON))); SigControl invalidSig = shape.signedWith(sigs(OFF, sigs(ON, ON, OFF), sigs(OFF, OFF, ON))); @@ -143,7 +143,7 @@ private static Transaction replaceTxnNodeAccount(Transaction txn) { } @HapiTest - private HapiSpec createFailsWithPayerAccountNotFound() { + final HapiSpec createFailsWithPayerAccountNotFound() { KeyShape shape = listOf(SIMPLE, threshOf(2, 3), threshOf(1, 3)); SigControl validSig = shape.signedWith(sigs(ON, sigs(ON, ON, OFF), sigs(OFF, OFF, ON))); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileDeleteSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileDeleteSuite.java index 36c006514a5d..71877582351e 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileDeleteSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileDeleteSuite.java @@ -53,7 +53,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec canDeleteWithAnyOneOfTopLevelKeyList() { + final HapiSpec canDeleteWithAnyOneOfTopLevelKeyList() { KeyShape shape = listOf(SIMPLE, threshOf(1, 2), listOf(2)); SigControl deleteSigs = shape.signedWith(sigs(ON, sigs(OFF, OFF), sigs(ON, OFF))); @@ -64,7 +64,7 @@ private HapiSpec canDeleteWithAnyOneOfTopLevelKeyList() { } @HapiTest - private HapiSpec getDeletedFileInfo() { + final HapiSpec getDeletedFileInfo() { return defaultHapiSpec("getDeletedFileInfo") .given(fileCreate("deletedFile").logged()) .when(fileDelete("deletedFile").logged()) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileUpdateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileUpdateSuite.java index 97ecc3474d78..5301a678a557 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileUpdateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileUpdateSuite.java @@ -184,7 +184,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec associateHasExpectedSemantics() { + final HapiSpec associateHasExpectedSemantics() { return propertyPreservingHapiSpec("AssociateHasExpectedSemantics") .preserving("tokens.maxRelsPerInfoQuery") .given(flattened((Object[]) TokenAssociationSpecs.basicKeysAndTokens())) @@ -239,7 +239,7 @@ public HapiSpec notTooManyFeeScheduleCanBeCreated() { .then(overriding(MAX_CUSTOM_FEES_PROP, DEFAULT_MAX_CUSTOM_FEES)); } - private HapiSpec optimisticSpecialFileUpdate() { + final HapiSpec optimisticSpecialFileUpdate() { final var appendsPerBurst = 128; final var specialFile = "0.0.159"; final var specialFileContents = ByteString.copyFrom(randomUtf8Bytes(64 * BYTES_4K)); @@ -250,7 +250,7 @@ private HapiSpec optimisticSpecialFileUpdate() { } @HapiTest - private HapiSpec apiPermissionsChangeDynamically() { + final HapiSpec apiPermissionsChangeDynamically() { final var civilian = CIVILIAN; return defaultHapiSpec("ApiPermissionsChangeDynamically") .given( @@ -275,7 +275,7 @@ private HapiSpec apiPermissionsChangeDynamically() { } @HapiTest - private HapiSpec updateFeesCompatibleWithCreates() { + final HapiSpec updateFeesCompatibleWithCreates() { final long origLifetime = 7_200_000L; final long extension = 700_000L; final byte[] old2k = randomUtf8Bytes(BYTES_4K / 2); @@ -321,7 +321,7 @@ private HapiSpec updateFeesCompatibleWithCreates() { } @HapiTest - private HapiSpec vanillaUpdateSucceeds() { + final HapiSpec vanillaUpdateSucceeds() { final byte[] old4K = randomUtf8Bytes(BYTES_4K); final byte[] new4k = randomUtf8Bytes(BYTES_4K); final String firstMemo = "Originally"; @@ -341,7 +341,7 @@ private HapiSpec vanillaUpdateSucceeds() { } @HapiTest - private HapiSpec cannotUpdateExpirationPastMaxLifetime() { + final HapiSpec cannotUpdateExpirationPastMaxLifetime() { return defaultHapiSpec("CannotUpdateExpirationPastMaxLifetime") .given(fileCreate("test")) .when() @@ -351,7 +351,7 @@ private HapiSpec cannotUpdateExpirationPastMaxLifetime() { } @HapiTest - private HapiSpec maxRefundIsEnforced() { + final HapiSpec maxRefundIsEnforced() { return propertyPreservingHapiSpec("MaxRefundIsEnforced") .preserving(MAX_REFUND_GAS_PROP) .given(overriding(MAX_REFUND_GAS_PROP, "5"), uploadInitCode(CONTRACT), contractCreate(CONTRACT)) @@ -362,7 +362,7 @@ private HapiSpec maxRefundIsEnforced() { } // C.f. https://github.com/hashgraph/hedera-services/pull/8908 - private HapiSpec allUnusedGasIsRefundedIfSoConfigured() { + final HapiSpec allUnusedGasIsRefundedIfSoConfigured() { return propertyPreservingHapiSpec("AllUnusedGasIsRefundedIfSoConfigured") .preserving(MAX_REFUND_GAS_PROP) .given( @@ -376,7 +376,7 @@ private HapiSpec allUnusedGasIsRefundedIfSoConfigured() { } @HapiTest - private HapiSpec gasLimitOverMaxGasLimitFailsPrecheck() { + final HapiSpec gasLimitOverMaxGasLimitFailsPrecheck() { return propertyPreservingHapiSpec("GasLimitOverMaxGasLimitFailsPrecheck") .preserving(CONS_MAX_GAS_PROP) .given( @@ -391,7 +391,7 @@ private HapiSpec gasLimitOverMaxGasLimitFailsPrecheck() { } @HapiTest - private HapiSpec kvLimitsEnforced() { + final HapiSpec kvLimitsEnforced() { final var contract = "User"; final var gasToOffer = 1_000_000; @@ -454,7 +454,7 @@ private HapiSpec kvLimitsEnforced() { @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec serviceFeeRefundedIfConsGasExhausted() { + final HapiSpec serviceFeeRefundedIfConsGasExhausted() { final var contract = "User"; final var gasToOffer = Long.parseLong(DEFAULT_MAX_CONS_GAS); final var civilian = "payer"; @@ -543,7 +543,7 @@ public HapiSpec chainIdChangesDynamically() { } @HapiTest - private HapiSpec entitiesNotCreatableAfterUsageLimitsReached() { + final HapiSpec entitiesNotCreatableAfterUsageLimitsReached() { final var notToBe = "ne'erToBe"; return propertyPreservingHapiSpec("EntitiesNotCreatableAfterUsageLimitsReached") .preserving( @@ -576,7 +576,7 @@ private HapiSpec entitiesNotCreatableAfterUsageLimitsReached() { } // It is not implemented yet in contracts - private HapiSpec rentItemizedAsExpectedWithOverridePriceTiers() { + final HapiSpec rentItemizedAsExpectedWithOverridePriceTiers() { final var slotUser = "SlotUser"; final var creation = "creation"; final var aSet = "aSet"; @@ -666,7 +666,7 @@ private HapiSpec rentItemizedAsExpectedWithOverridePriceTiers() { } @HapiTest - private HapiSpec messageSubmissionSizeChange() { + final HapiSpec messageSubmissionSizeChange() { final var defaultMaxBytesAllowed = 1024; final var longMessage = TxnUtils.randomUtf8Bytes(defaultMaxBytesAllowed); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/MidnightUpdateRateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/MidnightUpdateRateSuite.java index 6f7f263b456f..02d3052fcd8c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/MidnightUpdateRateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/MidnightUpdateRateSuite.java @@ -51,7 +51,7 @@ public List getSpecsInSuite() { return List.of(); } - private HapiSpec acct57UpdatesMidnightRateAtMidNight() throws ParseException { + final HapiSpec acct57UpdatesMidnightRateAtMidNight() throws ParseException { return defaultHapiSpec("Acct57UpdatesMidnightRateAtMidNight") .given(resetRatesOp, cryptoTransfer(tinyBarsFromTo(GENESIS, EXCHANGE_RATE_CONTROL, ADEQUATE_FUNDS))) .when( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/PermissionSemanticsSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/PermissionSemanticsSpec.java index 97168eeed3ff..dde7e719e81c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/PermissionSemanticsSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/PermissionSemanticsSpec.java @@ -76,7 +76,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec addressBookAdminExemptFromFeesGivenAuthorizedOps() { + final HapiSpec addressBookAdminExemptFromFeesGivenAuthorizedOps() { long amount = 100 * 100_000_000L; AtomicReference origContents = new AtomicReference<>(); return defaultHapiSpec("AddressBookAdminExemptFromFeesGivenAuthorizedOps") @@ -100,7 +100,7 @@ private HapiSpec addressBookAdminExemptFromFeesGivenAuthorizedOps() { } @HapiTest - private HapiSpec supportsImmutableFiles() { + final HapiSpec supportsImmutableFiles() { long extensionSecs = 666L; AtomicLong approxExpiry = new AtomicLong(); @@ -142,7 +142,7 @@ private HapiSpec supportsImmutableFiles() { } @HapiTest - private HapiSpec allowsDeleteWithOneTopLevelSig() { + final HapiSpec allowsDeleteWithOneTopLevelSig() { KeyShape wacl = KeyShape.listOf(KeyShape.SIMPLE, KeyShape.listOf(2)); var deleteSig = wacl.signedWith(sigs(ON, sigs(OFF, OFF))); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ProtectedFilesUpdateSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ProtectedFilesUpdateSuite.java index ac810cecfe64..50a1665130e4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ProtectedFilesUpdateSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ProtectedFilesUpdateSuite.java @@ -102,12 +102,12 @@ private List negativeTests() { unauthorizedAccountCannotUpdateExchangeRates()); } - private HapiSpec specialAccountCanUpdateSpecialPropertyFile( + final HapiSpec specialAccountCanUpdateSpecialPropertyFile( final String specialAccount, final String specialFile, final String property, final String expected) { return specialAccountCanUpdateSpecialPropertyFile(specialAccount, specialFile, property, expected, true); } - private HapiSpec specialAccountCanUpdateSpecialPropertyFile( + final HapiSpec specialAccountCanUpdateSpecialPropertyFile( final String specialAccount, final String specialFile, final String property, @@ -140,12 +140,12 @@ private HapiSpecOperation propertyFileValidationOp( }); } - private HapiSpec specialAccountCanUpdateSpecialFile( + final HapiSpec specialAccountCanUpdateSpecialFile( final String specialAccount, final String specialFile, final String target, final String replacement) { return specialAccountCanUpdateSpecialFile(specialAccount, specialFile, target, replacement, true); } - private HapiSpec specialAccountCanUpdateSpecialFile( + final HapiSpec specialAccountCanUpdateSpecialFile( final String specialAccount, final String specialFile, final String target, @@ -160,7 +160,7 @@ private HapiSpec specialAccountCanUpdateSpecialFile( : (new String(contents).replace(target, replacement)).getBytes()); } - private HapiSpec specialAccountCanUpdateSpecialFile( + final HapiSpec specialAccountCanUpdateSpecialFile( final String specialAccount, final String specialFile, final boolean isFree, @@ -201,7 +201,7 @@ private HapiSpecOperation[] validateAndCleanUpOps( return ArrayUtils.addAll(accountBalanceUnchanged, opsArray); } - private HapiSpec unauthorizedAccountCannotUpdateSpecialFile(final String specialFile, final String newContents) { + final HapiSpec unauthorizedAccountCannotUpdateSpecialFile(final String specialFile, final String newContents) { return defaultHapiSpec("UnauthorizedAccountCannotUpdate" + specialFile) .given(cryptoCreate("unauthorizedAccount")) .when() @@ -212,114 +212,114 @@ private HapiSpec unauthorizedAccountCannotUpdateSpecialFile(final String special } @HapiTest - private HapiSpec account2CanUpdateApplicationProperties() { + final HapiSpec account2CanUpdateApplicationProperties() { return specialAccountCanUpdateSpecialPropertyFile(GENESIS, APP_PROPERTIES, "throttlingTps", "10"); } @HapiTest - private HapiSpec account50CanUpdateApplicationProperties() { + final HapiSpec account50CanUpdateApplicationProperties() { return specialAccountCanUpdateSpecialPropertyFile(SYSTEM_ADMIN, APP_PROPERTIES, "getReceiptTps", "100"); } @HapiTest - private HapiSpec unauthorizedAccountCannotUpdateApplicationProperties() { + final HapiSpec unauthorizedAccountCannotUpdateApplicationProperties() { return unauthorizedAccountCannotUpdateSpecialFile(APP_PROPERTIES, NEW_CONTENTS); } @HapiTest - private HapiSpec account2CanUpdateApiPermissions() { + final HapiSpec account2CanUpdateApiPermissions() { return specialAccountCanUpdateSpecialPropertyFile(GENESIS, API_PERMISSIONS, "createTopic", "1-*"); } @HapiTest - private HapiSpec account50CanUpdateApiPermissions() { + final HapiSpec account50CanUpdateApiPermissions() { return specialAccountCanUpdateSpecialPropertyFile(SYSTEM_ADMIN, API_PERMISSIONS, "updateFile", "1-*"); } @HapiTest - private HapiSpec unauthorizedAccountCannotUpdateApiPermissions() { + final HapiSpec unauthorizedAccountCannotUpdateApiPermissions() { return unauthorizedAccountCannotUpdateSpecialFile(API_PERMISSIONS, NEW_CONTENTS); } @HapiTest - private HapiSpec account2CanUpdateAddressBook() { + final HapiSpec account2CanUpdateAddressBook() { return specialAccountCanUpdateSpecialFile( GENESIS, ADDRESS_BOOK, true, contents -> extendedBioAddressBook(contents, TARGET_MEMO, REPLACE_MEMO)); } @HapiTest - private HapiSpec account50CanUpdateAddressBook() { + final HapiSpec account50CanUpdateAddressBook() { return specialAccountCanUpdateSpecialFile(SYSTEM_ADMIN, ADDRESS_BOOK, TARGET_MEMO, REPLACE_MEMO); } @HapiTest - private HapiSpec account55CanUpdateAddressBook() { + final HapiSpec account55CanUpdateAddressBook() { return specialAccountCanUpdateSpecialFile(ADDRESS_BOOK_CONTROL, ADDRESS_BOOK, TARGET_MEMO, REPLACE_MEMO, false); } @HapiTest - private HapiSpec unauthorizedAccountCannotUpdateAddressBook() { + final HapiSpec unauthorizedAccountCannotUpdateAddressBook() { return unauthorizedAccountCannotUpdateSpecialFile(ADDRESS_BOOK, NEW_CONTENTS); } @HapiTest - private HapiSpec account2CanUpdateNodeDetails() { + final HapiSpec account2CanUpdateNodeDetails() { return specialAccountCanUpdateSpecialFile( GENESIS, NODE_DETAILS, true, contents -> extendedBioNodeDetails(contents, TARGET_MEMO, REPLACE_MEMO)); } @HapiTest - private HapiSpec account50CanUpdateNodeDetails() { + final HapiSpec account50CanUpdateNodeDetails() { return specialAccountCanUpdateSpecialFile(SYSTEM_ADMIN, NODE_DETAILS, TARGET_MEMO, REPLACE_MEMO); } @HapiTest - private HapiSpec account55CanUpdateNodeDetails() { + final HapiSpec account55CanUpdateNodeDetails() { return specialAccountCanUpdateSpecialFile(ADDRESS_BOOK_CONTROL, NODE_DETAILS, TARGET_MEMO, REPLACE_MEMO, false); } @HapiTest - private HapiSpec unauthorizedAccountCannotUpdateNodeDetails() { + final HapiSpec unauthorizedAccountCannotUpdateNodeDetails() { return unauthorizedAccountCannotUpdateSpecialFile(NODE_DETAILS, NEW_CONTENTS); } @HapiTest - private HapiSpec account2CanUpdateFeeSchedule() { + final HapiSpec account2CanUpdateFeeSchedule() { return specialAccountCanUpdateSpecialFile(GENESIS, FEE_SCHEDULE, IGNORE, IGNORE); } @HapiTest - private HapiSpec account50CanUpdateFeeSchedule() { + final HapiSpec account50CanUpdateFeeSchedule() { return specialAccountCanUpdateSpecialFile(SYSTEM_ADMIN, FEE_SCHEDULE, IGNORE, IGNORE); } @HapiTest - private HapiSpec account56CanUpdateFeeSchedule() { + final HapiSpec account56CanUpdateFeeSchedule() { return specialAccountCanUpdateSpecialFile(FEE_SCHEDULE_CONTROL, FEE_SCHEDULE, IGNORE, IGNORE); } @HapiTest - private HapiSpec unauthorizedAccountCannotUpdateFeeSchedule() { + final HapiSpec unauthorizedAccountCannotUpdateFeeSchedule() { return unauthorizedAccountCannotUpdateSpecialFile(FEE_SCHEDULE, NEW_CONTENTS); } @HapiTest - private HapiSpec account2CanUpdateExchangeRates() { + final HapiSpec account2CanUpdateExchangeRates() { return specialAccountCanUpdateSpecialFile(GENESIS, EXCHANGE_RATES, IGNORE, IGNORE); } @HapiTest - private HapiSpec account50CanUpdateExchangeRates() { + final HapiSpec account50CanUpdateExchangeRates() { return specialAccountCanUpdateSpecialFile(SYSTEM_ADMIN, EXCHANGE_RATES, IGNORE, IGNORE); } @HapiTest - private HapiSpec account57CanUpdateExchangeRates() { + final HapiSpec account57CanUpdateExchangeRates() { return specialAccountCanUpdateSpecialFile(EXCHANGE_RATE_CONTROL, EXCHANGE_RATES, IGNORE, IGNORE); } @HapiTest - private HapiSpec unauthorizedAccountCannotUpdateExchangeRates() { + final HapiSpec unauthorizedAccountCannotUpdateExchangeRates() { return unauthorizedAccountCannotUpdateSpecialFile(EXCHANGE_RATES, NEW_CONTENTS); } diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ValidateNewAddressBook.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ValidateNewAddressBook.java index 1b7a31f88a8d..91110396b3dc 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ValidateNewAddressBook.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/ValidateNewAddressBook.java @@ -43,7 +43,7 @@ public List getSpecsInSuite() { return List.of(fetchFiles()); } - private HapiSpec fetchFiles() { + final HapiSpec fetchFiles() { return defaultHapiSpec("ValidateNewAddressBook") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/AppendFailuresSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/AppendFailuresSpec.java index 61c73f91da72..79a0bb7c5210 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/AppendFailuresSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/AppendFailuresSpec.java @@ -46,7 +46,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec handleRejectsOversized() { + final HapiSpec handleRejectsOversized() { byte[] BYTES_3K_MINUS1 = new byte[3 * 1024 - 1]; Arrays.fill(BYTES_3K_MINUS1, (byte) 0xAB); byte[] BYTES_1 = new byte[] {(byte) 0xAB}; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/CreateFailuresSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/CreateFailuresSpec.java index 1dac00611a2a..d97c1df86974 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/CreateFailuresSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/CreateFailuresSpec.java @@ -46,7 +46,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec precheckRejectsBadEffectiveAutoRenewPeriod() { + final HapiSpec precheckRejectsBadEffectiveAutoRenewPeriod() { var now = Instant.now(); System.out.println(now.getEpochSecond()); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/DeleteFailuresSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/DeleteFailuresSpec.java index ad2de7881fd2..5e972f95412c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/DeleteFailuresSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/DeleteFailuresSpec.java @@ -43,7 +43,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec handleRejectsMissingFile() { + final HapiSpec handleRejectsMissingFile() { return defaultHapiSpec("handleRejectsMissingFile") .given() .when() @@ -51,7 +51,7 @@ private HapiSpec handleRejectsMissingFile() { } @HapiTest - private HapiSpec handleRejectsDeletedFile() { + final HapiSpec handleRejectsDeletedFile() { return defaultHapiSpec("handleRejectsDeletedFile") .given(fileCreate("tbd")) .when(fileDelete("tbd")) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/QueryFailuresSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/QueryFailuresSpec.java index e612fd98f24a..478674aaeb9c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/QueryFailuresSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/QueryFailuresSpec.java @@ -51,7 +51,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec getsExpectedRejections() { + final HapiSpec getsExpectedRejections() { return defaultHapiSpec("getsExpectedRejections") .given(fileCreate("tbd"), fileDelete("tbd")) .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/UpdateFailuresSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/UpdateFailuresSpec.java index 296c4c6003e4..034c79917ec4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/UpdateFailuresSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/negative/UpdateFailuresSpec.java @@ -74,7 +74,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec confusedUpdateCantExtendExpiry() { + final HapiSpec confusedUpdateCantExtendExpiry() { // this test verify that the exchange rate file parsed correctly on update, it doesn't check expiry var initialExpiry = new AtomicLong(); var extension = 1_000L; @@ -94,7 +94,7 @@ private HapiSpec confusedUpdateCantExtendExpiry() { } @HapiTest - private HapiSpec precheckRejectsUnauthorized() { + final HapiSpec precheckRejectsUnauthorized() { // this test is to verify that the system files cannot be updated without privileged account return defaultHapiSpec("precheckRejectsUnauthorized") .given(cryptoCreate(CIVILIAN)) @@ -109,7 +109,7 @@ private HapiSpec precheckRejectsUnauthorized() { } @HapiTest - private HapiSpec precheckAllowsMissing() { + final HapiSpec precheckAllowsMissing() { return defaultHapiSpec("PrecheckAllowsMissing") .given() .when() @@ -122,7 +122,7 @@ private HapiSpec precheckAllowsMissing() { } @HapiTest - private HapiSpec precheckAllowsDeleted() { + final HapiSpec precheckAllowsDeleted() { return defaultHapiSpec("PrecheckAllowsDeleted") .given(fileCreate("tbd")) .when(fileDelete("tbd")) @@ -130,7 +130,7 @@ private HapiSpec precheckAllowsDeleted() { } @HapiTest - private HapiSpec precheckRejectsPrematureExpiry() { + final HapiSpec precheckRejectsPrematureExpiry() { long now = Instant.now().getEpochSecond(); return defaultHapiSpec("PrecheckRejectsPrematureExpiry") .given(fileCreate("file")) @@ -142,7 +142,7 @@ private HapiSpec precheckRejectsPrematureExpiry() { } @HapiTest - private HapiSpec precheckAllowsBadEncoding() { + final HapiSpec precheckAllowsBadEncoding() { return defaultHapiSpec("PrecheckAllowsBadEncoding") .given(fileCreate("file")) .when() @@ -156,7 +156,7 @@ private HapiSpec precheckAllowsBadEncoding() { @SuppressWarnings("java:S5960") @HapiTest - private HapiSpec handleIgnoresEarlierExpiry() { + final HapiSpec handleIgnoresEarlierExpiry() { var initialExpiry = new AtomicLong(); return defaultHapiSpec("HandleIgnoresEarlierExpiry") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/positive/CreateSuccessSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/positive/CreateSuccessSpec.java index 090b04dbd21b..af9106c640d4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/positive/CreateSuccessSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/positive/CreateSuccessSpec.java @@ -52,7 +52,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec targetsAppear() { + final HapiSpec targetsAppear() { var lifetime = 100_000L; var requestedExpiry = Instant.now().getEpochSecond() + lifetime; var contents = "SOMETHING".getBytes(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/positive/SysDelSysUndelSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/positive/SysDelSysUndelSpec.java index 39f0cc2f1af6..8821633bc26b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/positive/SysDelSysUndelSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/positive/SysDelSysUndelSpec.java @@ -63,7 +63,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec distinguishesAdminPrivileges() { + final HapiSpec distinguishesAdminPrivileges() { final var lifetime = THREE_MONTHS_IN_SECONDS; return defaultHapiSpec("DistinguishesAdminPrivileges") @@ -80,7 +80,7 @@ private HapiSpec distinguishesAdminPrivileges() { } @HapiTest - private HapiSpec systemDeleteWithPastExpiryDestroysFile() { + final HapiSpec systemDeleteWithPastExpiryDestroysFile() { final var lifetime = THREE_MONTHS_IN_SECONDS; return defaultHapiSpec("systemDeleteWithPastExpiryDestroysFile") @@ -94,7 +94,7 @@ private HapiSpec systemDeleteWithPastExpiryDestroysFile() { } @HapiTest - private HapiSpec systemDeleteThenUndeleteRestoresContentsAndExpiry() { + final HapiSpec systemDeleteThenUndeleteRestoresContentsAndExpiry() { var now = Instant.now().getEpochSecond(); var lifetime = THREE_MONTHS_IN_SECONDS; AtomicLong initExpiry = new AtomicLong(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/CryptoTransferThenFreezeTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/CryptoTransferThenFreezeTest.java index d3c1d7aed860..d2dfdabad01f 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/CryptoTransferThenFreezeTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/CryptoTransferThenFreezeTest.java @@ -44,7 +44,7 @@ public List getSpecsInSuite() { return List.of(runCryptoTransfers(), freezeAfterTransfers()); } - private HapiSpec freezeAfterTransfers() { + final HapiSpec freezeAfterTransfers() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); return defaultHapiSpec("FreezeAfterTransfers") .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeAbort.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeAbort.java index e9780705fcf5..28989f54b88c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeAbort.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeAbort.java @@ -42,7 +42,7 @@ public List getSpecsInSuite() { return List.of(new HapiSpec[] {freezeAbort()}); } - private HapiSpec freezeAbort() { + final HapiSpec freezeAbort() { return defaultHapiSpec("FreezeAbort") .given() .when(UtilVerbs.freezeAbort().payingWith(GENESIS)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeDockerNetwork.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeDockerNetwork.java index 18c4bc9eb5f0..95fa81060415 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeDockerNetwork.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeDockerNetwork.java @@ -40,7 +40,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec justFreeze() { + final HapiSpec justFreeze() { return customHapiSpec("JustFreeze") .withProperties(Map.of("nodes", "127.0.0.1:50213:0.0.3,127.0.0.1:50214:0.0.4,127.0.0.1:50215:0.0.5")) .given() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeIntellijNetwork.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeIntellijNetwork.java index b5fbf01b0869..328835774b1d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeIntellijNetwork.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeIntellijNetwork.java @@ -39,7 +39,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec justFreeze() { + final HapiSpec justFreeze() { return defaultHapiSpec("JustFreeze") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeSuite.java index 9a33e5cc184c..72f8b8aa5855 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeSuite.java @@ -56,7 +56,7 @@ public List getSpecsInSuite() { return List.of(uploadNewFile()); } - private HapiSpec uploadNewFile() { + final HapiSpec uploadNewFile() { String uploadFile = UPDATE_NEW_FILE; if (uploadPath != null) { log.info("Creating zip file from {}", uploadPath); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeUpgrade.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeUpgrade.java index c04f775d6d6c..077178a591e1 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeUpgrade.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/FreezeUpgrade.java @@ -47,7 +47,7 @@ public List getSpecsInSuite() { return List.of(new HapiSpec[] {freezeUpgrade()}); } - private HapiSpec freezeUpgrade() { + final HapiSpec freezeUpgrade() { return defaultHapiSpec("FreezeUpgrade") .given(initializeSettings()) .when(sourcing(() -> UtilVerbs.freezeUpgrade() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/PrepareUpgrade.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/PrepareUpgrade.java index 8708101ad89d..8c9688999d94 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/PrepareUpgrade.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/PrepareUpgrade.java @@ -46,7 +46,7 @@ public List getSpecsInSuite() { return List.of(new HapiSpec[] {prepareUpgrade()}); } - private HapiSpec prepareUpgrade() { + final HapiSpec prepareUpgrade() { return defaultHapiSpec("PrepareUpgrade") .given(initializeSettings()) .when(sourcing(() -> UtilVerbs.prepareUpgrade() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/SimpleFreezeOnly.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/SimpleFreezeOnly.java index 2f7c8f9e6e50..ce84ee5836b7 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/SimpleFreezeOnly.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/SimpleFreezeOnly.java @@ -56,7 +56,7 @@ public boolean canRunConcurrent() { return true; } - private HapiSpec simpleFreezeWithTimestamp() { + final HapiSpec simpleFreezeWithTimestamp() { return defaultHapiSpec("SimpleFreezeWithTimeStamp") .given(freezeOnly().payingWith(GENESIS).startingAt(Instant.now().plusSeconds(10))) .when(sleepFor(11000)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpdateFileForUpgrade.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpdateFileForUpgrade.java index 98706105bc58..042ce8429a37 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpdateFileForUpgrade.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpdateFileForUpgrade.java @@ -54,7 +54,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec updateFileForUpgrade() { + final HapiSpec updateFileForUpgrade() { return defaultHapiSpec("UpdateFileForUpgrade") .given(initializeSettings()) .when(sourcing(() -> { diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpdateServerFiles.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpdateServerFiles.java index 0b82d22f26f6..febd80c5e807 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpdateServerFiles.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpdateServerFiles.java @@ -76,7 +76,7 @@ private List postiveTests() { // Zip all files under target directory and add an unzip and launch script to it // then send to server to update server - private HapiSpec uploadGivenDirectory() { + final HapiSpec uploadGivenDirectory() { log.info("Creating zip file from {}", uploadPath); // create directory if uploadPath doesn't exist diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpgradeSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpgradeSuite.java index 375eae2afc35..a903411b7466 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpgradeSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/freeze/UpgradeSuite.java @@ -106,14 +106,14 @@ public List getSpecsInSuite() { }); } - private HapiSpec precheckRejectsUnknownFreezeType() { + final HapiSpec precheckRejectsUnknownFreezeType() { return defaultHapiSpec("PrejeckRejectsUnknownFreezeType") .given() .when() .then(freeze().hasPrecheck(INVALID_FREEZE_TRANSACTION_BODY)); } - private HapiSpec freezeOnlyPrecheckRejectsInvalid() { + final HapiSpec freezeOnlyPrecheckRejectsInvalid() { return defaultHapiSpec("freezeOnlyPrecheckRejectsInvalid") .given() .when() @@ -125,7 +125,7 @@ private HapiSpec freezeOnlyPrecheckRejectsInvalid() { freezeOnly().startingIn(-60).minutes().hasPrecheck(FREEZE_START_TIME_MUST_BE_FUTURE)); } - private HapiSpec freezeUpgradeValidationRejectsInvalid() { + final HapiSpec freezeUpgradeValidationRejectsInvalid() { return defaultHapiSpec("freezeUpgradeValidationRejectsInvalid") .given() .when() @@ -153,14 +153,14 @@ private HapiSpec freezeUpgradeValidationRejectsInvalid() { .hasPrecheck(INVALID_FREEZE_TRANSACTION_BODY)); } - private HapiSpec freezeAbortIsIdempotent() { + final HapiSpec freezeAbortIsIdempotent() { return defaultHapiSpec("FreezeAbortIsIdempotent") .given() .when() .then(freezeAbort().hasKnownStatus(SUCCESS), freezeAbort().hasKnownStatus(SUCCESS)); } - private HapiSpec prepareUpgradeValidationRejectsInvalid() { + final HapiSpec prepareUpgradeValidationRejectsInvalid() { return defaultHapiSpec("PrepareUpgradeValidationRejectsInvalid") .given( fileUpdate(standardUpdateFile) @@ -220,7 +220,7 @@ private HapiSpec prepareUpgradeValidationRejectsInvalid() { freezeAbort()); } - private HapiSpec telemetryUpgradeValidationRejectsInvalid() { + final HapiSpec telemetryUpgradeValidationRejectsInvalid() { return defaultHapiSpec("TelemetryUpgradeValidationRejectsInvalid") .given( cryptoTransfer(tinyBarsFromTo(GENESIS, FREEZE_ADMIN, ONE_HUNDRED_HBARS)), @@ -254,7 +254,7 @@ private HapiSpec telemetryUpgradeValidationRejectsInvalid() { .hasKnownStatus(FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH)); } - private HapiSpec canFreezeUpgradeWithPreparedUpgrade() { + final HapiSpec canFreezeUpgradeWithPreparedUpgrade() { return defaultHapiSpec("CanFreezeUpgradeWithPreparedUpgrade") .given( cryptoTransfer(tinyBarsFromTo(GENESIS, FREEZE_ADMIN, ONE_HUNDRED_HBARS)), @@ -284,7 +284,7 @@ private HapiSpec canFreezeUpgradeWithPreparedUpgrade() { freezeAbort()); } - private HapiSpec canTelemetryUpgradeWithValid() { + final HapiSpec canTelemetryUpgradeWithValid() { return defaultHapiSpec("CanTelemetryUpgradeWithValid") .given(cryptoTransfer(tinyBarsFromTo(GENESIS, FREEZE_ADMIN, ONE_HUNDRED_HBARS))) .when( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/InterPartitionMovementSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/InterPartitionMovementSuite.java index e4c9efd664d5..ac4defb76f57 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/InterPartitionMovementSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/InterPartitionMovementSuite.java @@ -69,7 +69,7 @@ public List getSpecsInSuite() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec partitionMoveWithoutUserSignature() { + final HapiSpec partitionMoveWithoutUserSignature() { return defaultHapiSpec("PartitionMoveWithoutUserSignature") .given(fungibleTokenWithFeatures(INTER_PARTITION_MANAGEMENT) .withPartitions(RED_PARTITION, BLUE_PARTITION, GREEN_PARTITION) @@ -95,7 +95,7 @@ private HapiSpec partitionMoveWithoutUserSignature() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec partitionMoveWithUserSignature() { + final HapiSpec partitionMoveWithUserSignature() { return defaultHapiSpec("PartitionMoveWithUserSignature") .given(fungibleTokenWithFeatures(INTER_PARTITION_MANAGEMENT) .withPartitions(RED_PARTITION, BLUE_PARTITION, GREEN_PARTITION) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/PartitionAssociationsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/PartitionAssociationsSuite.java index ebb98842c281..6f6b54383df7 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/PartitionAssociationsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/PartitionAssociationsSuite.java @@ -71,7 +71,7 @@ public List getSpecsInSuite() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec associateWithPartitionedTokenAutomatically() { + final HapiSpec associateWithPartitionedTokenAutomatically() { return defaultHapiSpec("AssociateWithPartitionedTokenAutomatically") .given(nonFungibleTokenWithFeatures(PARTITIONING) .withPartition(BLUE_PARTITION, p -> p.assignedSerialNos(2L))) @@ -94,7 +94,7 @@ private HapiSpec associateWithPartitionedTokenAutomatically() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec associateWithPartitionAndToken() { + final HapiSpec associateWithPartitionAndToken() { return defaultHapiSpec("AssociateWithPartitionAndToken") .given( cryptoCreate(ALICE).balance(ONE_HUNDRED_HBARS), @@ -123,7 +123,7 @@ private HapiSpec associateWithPartitionAndToken() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec autoAssociateSiblingPartitions() { + final HapiSpec autoAssociateSiblingPartitions() { return defaultHapiSpec("AutoAssociateSiblingPartitions") .given(fungibleTokenWithFeatures(PARTITIONING) .withPartitions(RED_PARTITION) @@ -153,7 +153,7 @@ private HapiSpec autoAssociateSiblingPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec autoAssociateChildPartitions() { + final HapiSpec autoAssociateChildPartitions() { return defaultHapiSpec("AutoAssociateChildPartitions") .given( cryptoCreate(CIVILIAN_PAYER).balance(ONE_HUNDRED_HBARS), @@ -184,7 +184,7 @@ private HapiSpec autoAssociateChildPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec disassociateEmptyPartition() { + final HapiSpec disassociateEmptyPartition() { return defaultHapiSpec("DisassociateEmptyPartition") .given( fungibleTokenWithFeatures(PARTITIONING) @@ -212,7 +212,7 @@ private HapiSpec disassociateEmptyPartition() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec doNotAllowDisassociateWithNonEmptyPartition() { + final HapiSpec doNotAllowDisassociateWithNonEmptyPartition() { return defaultHapiSpec("DoNotAllowDisassociateWithNonEmptyPartition") .given( fungibleTokenWithFeatures(PARTITIONING) @@ -248,7 +248,7 @@ private HapiSpec doNotAllowDisassociateWithNonEmptyPartition() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec ensurePartitionsRemovedBeforeTokenDisassociation() { + final HapiSpec ensurePartitionsRemovedBeforeTokenDisassociation() { return defaultHapiSpec("EnsurePartitionsRemovedBeforeTokenDisassociation") .given(fungibleTokenWithFeatures(PARTITIONING) .withPartitions(RED_PARTITION) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/PartitionsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/PartitionsSuite.java index cd8a98c0d98c..f17cd68146bb 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/PartitionsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/PartitionsSuite.java @@ -106,7 +106,7 @@ public List getSpecsInSuite() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec createNewPartitionDefinitions() { + final HapiSpec createNewPartitionDefinitions() { return defaultHapiSpec("CreateNewPartitionDefinitions") .given(fungibleTokenWithFeatures(PARTITIONING)) .when() @@ -123,7 +123,7 @@ private HapiSpec createNewPartitionDefinitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec updatePartitionDefinitionsMemo() { + final HapiSpec updatePartitionDefinitionsMemo() { return defaultHapiSpec("UpdatePartitionDefinitionsMemo") .given(fungibleTokenWithFeatures(PARTITIONING, ADMIN_CONTROL) .withPartition(RED_PARTITION, p -> p.memo("TBD"))) @@ -140,7 +140,7 @@ private HapiSpec updatePartitionDefinitionsMemo() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec deletePartitionDefinitions() { + final HapiSpec deletePartitionDefinitions() { return defaultHapiSpec("DeletePartitionDefinitions") .given(fungibleTokenWithFeatures(PARTITIONING, ADMIN_CONTROL).withPartition(RED_PARTITION)) .when( @@ -157,7 +157,7 @@ private HapiSpec deletePartitionDefinitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec transferBetweenPartitions() { + final HapiSpec transferBetweenPartitions() { return defaultHapiSpec("TransferBetweenPartitions") .given(fungibleTokenWithFeatures(PARTITIONING, INTER_PARTITION_MANAGEMENT) .withPartitions(RED_PARTITION, BLUE_PARTITION) @@ -180,7 +180,7 @@ private HapiSpec transferBetweenPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec transferNFTsWithinPartitions() { + final HapiSpec transferNFTsWithinPartitions() { return defaultHapiSpec("TransferNFTsWithinPartitions") .given(nonFungibleTokenWithFeatures(PARTITIONING, INTER_PARTITION_MANAGEMENT) .withPartitions(RED_PARTITION, BLUE_PARTITION) @@ -209,7 +209,7 @@ private HapiSpec transferNFTsWithinPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec pauseTokenTransfersIncludingPartitions() { + final HapiSpec pauseTokenTransfersIncludingPartitions() { return defaultHapiSpec("PauseTokenTransfersIncludingPartitions") .given(nonFungibleTokenWithFeatures(PARTITIONING, PAUSING) .withPartitions(RED_PARTITION, BLUE_PARTITION) @@ -239,7 +239,7 @@ private HapiSpec pauseTokenTransfersIncludingPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec freezeTokenTransfersForAccountIncludingPartitions() { + final HapiSpec freezeTokenTransfersForAccountIncludingPartitions() { return defaultHapiSpec("FreezeTokenTransfersForAccountIncludingPartitions") .given(nonFungibleTokenWithFeatures(PARTITIONING, FREEZING) .withPartitions(RED_PARTITION, BLUE_PARTITION) @@ -268,7 +268,7 @@ private HapiSpec freezeTokenTransfersForAccountIncludingPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec requireKycForTokenTransfersIncludingPartitions() { + final HapiSpec requireKycForTokenTransfersIncludingPartitions() { return defaultHapiSpec("RequireKycForTokenTransfersIncludingPartitions") .given(nonFungibleTokenWithFeatures(PARTITIONING, KYC_MANAGEMENT) .withPartitions(RED_PARTITION, BLUE_PARTITION) @@ -297,7 +297,7 @@ private HapiSpec requireKycForTokenTransfersIncludingPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec pauseTransfersForSpecificPartition() { + final HapiSpec pauseTransfersForSpecificPartition() { return defaultHapiSpec("PauseTransfersForSpecificPartition") .given(nonFungibleTokenWithFeatures(PARTITIONING, PAUSING) .withPartitions(RED_PARTITION, BLUE_PARTITION) @@ -328,7 +328,7 @@ private HapiSpec pauseTransfersForSpecificPartition() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec freezeTransfersForSpecificPartitionOnAccount() { + final HapiSpec freezeTransfersForSpecificPartitionOnAccount() { return defaultHapiSpec("FreezeTransfersForSpecificPartitionOnAccount") .given(nonFungibleTokenWithFeatures(PARTITIONING, FREEZING) .withPartitions(RED_PARTITION, BLUE_PARTITION) @@ -359,7 +359,7 @@ private HapiSpec freezeTransfersForSpecificPartitionOnAccount() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec requireKycForPartitionTransfers() { + final HapiSpec requireKycForPartitionTransfers() { return defaultHapiSpec("RequireKycForPartitionTransfers") .given( cryptoCreate(ALICE), @@ -384,7 +384,7 @@ private HapiSpec requireKycForPartitionTransfers() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec createFixedSupplyTokenWithPartitionKey() { + final HapiSpec createFixedSupplyTokenWithPartitionKey() { return defaultHapiSpec("CreateFixedSupplyTokenWithPartitionKey") .given( // Without a supply key, this will be a fixed supply token @@ -416,7 +416,7 @@ private HapiSpec createFixedSupplyTokenWithPartitionKey() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec notHonorDeletionOfTokenWithExistingPartitions() { + final HapiSpec notHonorDeletionOfTokenWithExistingPartitions() { return defaultHapiSpec("NotHonorDeletionOfTokenWithExistingPartitions") .given(fungibleTokenWithFeatures(PARTITIONING) .initialSupply(6L) @@ -444,7 +444,7 @@ private HapiSpec notHonorDeletionOfTokenWithExistingPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec mintToSpecificPartitionOfTreasury() { + final HapiSpec mintToSpecificPartitionOfTreasury() { return defaultHapiSpec("MintToSpecificPartitionOfTreasury") .given(fungibleTokenWithFeatures(PARTITIONING, SUPPLY_MANAGEMENT) .initialSupply(99L) @@ -467,7 +467,7 @@ private HapiSpec mintToSpecificPartitionOfTreasury() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec burnFromSpecificPartitionOfTreasury() { + final HapiSpec burnFromSpecificPartitionOfTreasury() { return defaultHapiSpec("BurnFromSpecificPartitionOfTreasury") .given(fungibleTokenWithFeatures(PARTITIONING, SUPPLY_MANAGEMENT) .initialSupply(99L) @@ -490,7 +490,7 @@ private HapiSpec burnFromSpecificPartitionOfTreasury() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec wipeFromSpecificPartitionInUserAccount() { + final HapiSpec wipeFromSpecificPartitionInUserAccount() { return defaultHapiSpec("WipeFromSpecificPartitionInUserAccount") .given(nonFungibleTokenWithFeatures(PARTITIONING, WIPING) .withPartitions(RED_PARTITION, BLUE_PARTITION) @@ -512,7 +512,7 @@ private HapiSpec wipeFromSpecificPartitionInUserAccount() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec smartContractAdministersPartitions() { + final HapiSpec smartContractAdministersPartitions() { return defaultHapiSpec("SmartContractAdministersPartitions") .given(fungibleTokenWithFeatures(PARTITIONING, ADMIN_CONTROL).managedByContract()) .when( @@ -557,7 +557,7 @@ private HapiSpec smartContractAdministersPartitions() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec freezeOrPauseAtTokenLevelOverridesPartition() { + final HapiSpec freezeOrPauseAtTokenLevelOverridesPartition() { return defaultHapiSpec("FreezeOrPauseAtTokenLevelOverridesPartition") .given(nonFungibleTokenWithFeatures(PARTITIONING, PAUSING, FREEZING) .withPartitions(RED_PARTITION, BLUE_PARTITION) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/TokenKeysDefinitionSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/TokenKeysDefinitionSuite.java index 929b198e84b9..b9d62658d887 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/TokenKeysDefinitionSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip796/TokenKeysDefinitionSuite.java @@ -68,7 +68,7 @@ public List getSpecsInSuite() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec manageLockKeyCapabilities() { + final HapiSpec manageLockKeyCapabilities() { return defaultHapiSpec("ManageLockKeyCapabilities") .given(fungibleTokenWithFeatures(ADMIN_CONTROL, LOCKING), newKeyNamed("newLockKey")) .when( @@ -90,7 +90,7 @@ private HapiSpec manageLockKeyCapabilities() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec managePartitionKeyCapabilities() { + final HapiSpec managePartitionKeyCapabilities() { return defaultHapiSpec("ManagePartitionKeyCapabilities") .given(fungibleTokenWithFeatures(ADMIN_CONTROL, PARTITIONING), newKeyNamed("newPartitionKey")) .when( @@ -112,7 +112,7 @@ private HapiSpec managePartitionKeyCapabilities() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec managePartitionMoveKeyCapabilities() { + final HapiSpec managePartitionMoveKeyCapabilities() { return defaultHapiSpec("ManagePartitionMoveKeyCapabilities") .given( fungibleTokenWithFeatures(ADMIN_CONTROL, INTER_PARTITION_MANAGEMENT), @@ -136,7 +136,7 @@ private HapiSpec managePartitionMoveKeyCapabilities() { * @return the HapiSpec for this HIP-796 user story */ @HapiTest - private HapiSpec manageKeysViaSmartContract() { + final HapiSpec manageKeysViaSmartContract() { return defaultHapiSpec("ManageKeysViaSmartContract") .given( fungibleTokenWithFeatures(ADMIN_CONTROL, LOCKING, PARTITIONING, INTER_PARTITION_MANAGEMENT) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2051Spec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2051Spec.java index 8ad16f15a7c1..7e385b2cc06d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2051Spec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2051Spec.java @@ -61,7 +61,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec tbdCanPayForItsOwnDeletion() { + final HapiSpec tbdCanPayForItsOwnDeletion() { return defaultHapiSpec("TbdCanPayForItsOwnDeletion") .given(cryptoCreate("tbd"), cryptoCreate(TRANSFER)) .when() @@ -74,7 +74,7 @@ private HapiSpec tbdCanPayForItsOwnDeletion() { } @HapiTest - private HapiSpec transferAccountCannotBeDeleted() { + final HapiSpec transferAccountCannotBeDeleted() { return defaultHapiSpec("TransferAccountCannotBeDeleted") .given(cryptoCreate(PAYER), cryptoCreate(TRANSFER), cryptoCreate("tbd")) .when(cryptoDelete(TRANSFER)) @@ -90,7 +90,7 @@ private HapiSpec transferAccountCannotBeDeleted() { } @HapiTest - private HapiSpec transferAccountCannotBeDeletedForContractTarget() { + final HapiSpec transferAccountCannotBeDeletedForContractTarget() { return defaultHapiSpec("TransferAccountCannotBeDeletedForContractTarget") .given( uploadInitCode("CreateTrivial"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2098Spec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2098Spec.java index 6fb4929b8169..b19b764b731b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2098Spec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2098Spec.java @@ -55,7 +55,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec txnApiPermissionsChangeImmediately() { + final HapiSpec txnApiPermissionsChangeImmediately() { return defaultHapiSpec("TxnApiPermissionsChangeImmediately") .given(cryptoCreate(CIVILIAN)) .when(fileUpdate(API_PERMISSIONS) @@ -71,7 +71,7 @@ private HapiSpec txnApiPermissionsChangeImmediately() { cryptoTransfer(tinyBarsFromTo(CIVILIAN, FUNDING, 1L)).payingWith(CIVILIAN)); } - private HapiSpec queryApiPermissionsChangeImmediately() { + final HapiSpec queryApiPermissionsChangeImmediately() { return defaultHapiSpec("QueryApiPermissionsChangeImmediately") .given(cryptoCreate(CIVILIAN), createTopic("misc")) .when(fileUpdate(API_PERMISSIONS) @@ -85,7 +85,7 @@ private HapiSpec queryApiPermissionsChangeImmediately() { getTopicInfo("misc").payingWith(CIVILIAN)); } - private HapiSpec adminsCanQueryNoMatterPermissions() { + final HapiSpec adminsCanQueryNoMatterPermissions() { return defaultHapiSpec("AdminsCanQueryNoMatterPermissions") .given(cryptoCreate(CIVILIAN), createTopic("misc")) .when(fileUpdate(API_PERMISSIONS) @@ -99,7 +99,7 @@ private HapiSpec adminsCanQueryNoMatterPermissions() { .overridingProps(Map.of(GET_TOPIC_INFO, "0-*"))); } - private HapiSpec adminsCanTransactNoMatterPermissions() { + final HapiSpec adminsCanTransactNoMatterPermissions() { return defaultHapiSpec("AdminsCanTransactNoMatterPermissions") .given(cryptoCreate(CIVILIAN)) .when(fileUpdate(API_PERMISSIONS) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2143Spec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2143Spec.java index e8a514a0f8e3..10c55fc54a63 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2143Spec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2143Spec.java @@ -46,7 +46,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec account55ControlCanUpdatePropertiesAndPermissions() { + final HapiSpec account55ControlCanUpdatePropertiesAndPermissions() { return defaultHapiSpec("Account55ControlCanUpdatePropertiesAndPermissions") .given(cryptoTransfer(tinyBarsFromTo(GENESIS, ADDRESS_BOOK_CONTROL, 1_000_000_000L))) .when( @@ -66,7 +66,7 @@ private HapiSpec account55ControlCanUpdatePropertiesAndPermissions() { } @HapiTest - private HapiSpec account57ControlCanUpdatePropertiesAndPermissions() { + final HapiSpec account57ControlCanUpdatePropertiesAndPermissions() { return defaultHapiSpec("Account57ControlCanUpdatePropertiesAndPermissions") .given(cryptoTransfer(tinyBarsFromTo(GENESIS, EXCHANGE_RATE_CONTROL, 1_000_000_000L))) .when( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2150Spec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2150Spec.java index 1e34dcd6d0ff..ae57d1309e14 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2150Spec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2150Spec.java @@ -54,7 +54,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec multiKeyNonPayerEntityVerifiedAsync() { + final HapiSpec multiKeyNonPayerEntityVerifiedAsync() { KeyShape LARGE_THRESH_SHAPE = KeyShape.threshOf(1, 10); SigControl firstOnly = LARGE_THRESH_SHAPE.signedWith(sigs(ON, OFF, OFF, OFF, OFF, OFF, OFF, OFF, OFF, OFF)); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2319Spec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2319Spec.java index c2ec1869ff3f..5f924becc336 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2319Spec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue2319Spec.java @@ -60,7 +60,7 @@ public List getSpecsInSuite() { @HapiTest @Disabled("Failing or intermittently failing HAPI Test") - private HapiSpec propsPermissionsSigReqsWaivedForAddressBookAdmin() { + final HapiSpec propsPermissionsSigReqsWaivedForAddressBookAdmin() { var pemLoc = ""; return defaultHapiSpec("PropsPermissionsSigReqsWaivedForAddressBookAdmin") @@ -88,7 +88,7 @@ private HapiSpec propsPermissionsSigReqsWaivedForAddressBookAdmin() { } @HapiTest - private HapiSpec sysFileImmutabilityWaivedForMasterAndTreasury() { + final HapiSpec sysFileImmutabilityWaivedForMasterAndTreasury() { return defaultHapiSpec("SysAccountSigReqsWaivedForMasterAndTreasury") .given( cryptoCreate("civilian"), @@ -113,7 +113,7 @@ private HapiSpec sysFileImmutabilityWaivedForMasterAndTreasury() { @HapiTest @Disabled("Failing or intermittently failing HAPI Test") - private HapiSpec sysAccountSigReqsWaivedForMasterAndTreasury() { + final HapiSpec sysAccountSigReqsWaivedForMasterAndTreasury() { var pemLoc = ""; return defaultHapiSpec("SysAccountSigReqsWaivedForMasterAndTreasury") @@ -141,7 +141,7 @@ private HapiSpec sysAccountSigReqsWaivedForMasterAndTreasury() { @HapiTest @Disabled("Failing or intermittently failing HAPI Test") - private HapiSpec sysFileSigReqsWaivedForMasterAndTreasury() { + final HapiSpec sysFileSigReqsWaivedForMasterAndTreasury() { var pemLoc = ""; var validRates = new AtomicReference(); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue305Spec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue305Spec.java index cfa0693e02e1..9e394355d70b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue305Spec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue305Spec.java @@ -66,7 +66,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec createDeleteInSameRoundWorks() { + final HapiSpec createDeleteInSameRoundWorks() { AtomicReference nextFileId = new AtomicReference<>(); return defaultHapiSpec("CreateDeleteInSameRoundWorks") .given( @@ -88,7 +88,7 @@ private HapiSpec createDeleteInSameRoundWorks() { getFileInfo(nextFileId::get).hasDeleted(true)); } - private HapiSpec congestionMultipliersRefreshOnPropertyUpdate() { + final HapiSpec congestionMultipliersRefreshOnPropertyUpdate() { final var civilian = "civilian"; final var preCongestionTxn = "preCongestionTxn"; final var postCongestionTxn = "postCongestionTxn"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue310Suite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue310Suite.java index 6ee29eb543e5..b82f453fd8fb 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue310Suite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/issues/Issue310Suite.java @@ -52,7 +52,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec duplicatedTxnsSameTypeDetected() { + final HapiSpec duplicatedTxnsSameTypeDetected() { long initialBalance = 10_000L; return defaultHapiSpec("duplicatedTxnsSameTypeDetected") @@ -69,7 +69,7 @@ private HapiSpec duplicatedTxnsSameTypeDetected() { } @HapiTest - private HapiSpec duplicatedTxnsDifferentTypesDetected() { + final HapiSpec duplicatedTxnsDifferentTypesDetected() { return defaultHapiSpec("duplicatedTxnsDifferentTypesDetected") .given( cryptoCreate("acct2").via("txnId2"), @@ -85,7 +85,7 @@ private HapiSpec duplicatedTxnsDifferentTypesDetected() { // This test requires multiple nodes @HapiTest - private HapiSpec duplicatedTxnsSameTypeDifferentNodesDetected() { + final HapiSpec duplicatedTxnsSameTypeDifferentNodesDetected() { return defaultHapiSpec("duplicatedTxnsSameTypeDifferentNodesDetected") .given( @@ -101,7 +101,7 @@ private HapiSpec duplicatedTxnsSameTypeDifferentNodesDetected() { // This test requires multiple nodes @HapiTest - private HapiSpec duplicatedTxnsDifferentTypesDifferentNodesDetected() { + final HapiSpec duplicatedTxnsDifferentTypesDifferentNodesDetected() { return defaultHapiSpec("duplicatedTxnsDifferentTypesDifferentNodesDetected") .given( cryptoCreate("acct4").via("txnId4").setNode("0.0.3"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/FeatureFlagSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/FeatureFlagSuite.java index b669f3c29954..b85db47465e0 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/FeatureFlagSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/FeatureFlagSuite.java @@ -81,7 +81,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec disableAllFeatureFlagsAndConfirmNotSupported() { + final HapiSpec disableAllFeatureFlagsAndConfirmNotSupported() { return defaultHapiSpec("disableAllFeatureFlagsAndConfirmNotSupported") .given(overridingAllOf(FeatureFlags.FEATURE_FLAGS.allDisabled())) .when() @@ -93,7 +93,7 @@ private HapiSpec disableAllFeatureFlagsAndConfirmNotSupported() { } @HapiTest - private HapiSpec enableAllFeatureFlagsAndDisableThrottlesForFurtherCiTesting() { + final HapiSpec enableAllFeatureFlagsAndDisableThrottlesForFurtherCiTesting() { return defaultHapiSpec("enableAllFeatureFlagsAndDisableThrottlesForFurtherCiTesting") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/LeakyContractTestsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/LeakyContractTestsSuite.java index bf6d262e3775..8592d8c1e621 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/LeakyContractTestsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/LeakyContractTestsSuite.java @@ -298,7 +298,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec transferErc20TokenFromErc721TokenFails() { + final HapiSpec transferErc20TokenFromErc721TokenFails() { return propertyPreservingHapiSpec("transferErc20TokenFromErc721TokenFails") .preserving(HEDERA_ALLOWANCES_IS_ENABLED) .given( @@ -339,7 +339,7 @@ private HapiSpec transferErc20TokenFromErc721TokenFails() { } @HapiTest - private HapiSpec transferErc20TokenFromContractWithApproval() { + final HapiSpec transferErc20TokenFromContractWithApproval() { final var transferFromOtherContractWithSignaturesTxn = "transferFromOtherContractWithSignaturesTxn"; final var nestedContract = "NestedERC20Contract"; @@ -466,7 +466,7 @@ private HapiSpec transferErc20TokenFromContractWithApproval() { } @HapiTest - private HapiSpec transferDontWorkWithoutTopLevelSignatures() { + final HapiSpec transferDontWorkWithoutTopLevelSignatures() { final var transferTokenTxn = "transferTokenTxn"; final var transferTokensTxn = "transferTokensTxn"; final var transferNFTTxn = "transferNFTTxn"; @@ -606,7 +606,7 @@ private HapiSpec transferDontWorkWithoutTopLevelSignatures() { } // Requires legacy security model, cannot be enabled as @HapiTest without refactoring to use contract keys - private HapiSpec transferWorksWithTopLevelSignatures() { + final HapiSpec transferWorksWithTopLevelSignatures() { final var transferTokenTxn = "transferTokenTxn"; final var transferTokensTxn = "transferTokensTxn"; final var transferNFTTxn = "transferNFTTxn"; @@ -768,7 +768,7 @@ private HapiSpec transferWorksWithTopLevelSignatures() { getAccountBalance(ACCOUNT).hasTokenBalance(VANILLA_TOKEN, 485L)); } - private HapiSpec transferFailsWithIncorrectAmounts() { + final HapiSpec transferFailsWithIncorrectAmounts() { final var transferTokenWithNegativeAmountTxn = "transferTokenWithNegativeAmountTxn"; final var contract = TOKEN_TRANSFER_CONTRACT; @@ -849,7 +849,7 @@ HapiSpec payerCannotOverSendValue() { .logged()); } - private HapiSpec createTokenWithInvalidFeeCollector() { + final HapiSpec createTokenWithInvalidFeeCollector() { return propertyPreservingHapiSpec("createTokenWithInvalidFeeCollector") .preserving(CRYPTO_CREATE_WITH_ALIAS_ENABLED, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) .given( @@ -896,7 +896,7 @@ private HapiSpec createTokenWithInvalidFeeCollector() { .error(INVALID_CUSTOM_FEE_COLLECTOR.name())))); } - private HapiSpec createTokenWithInvalidFixedFeeWithERC721Denomination() { + final HapiSpec createTokenWithInvalidFixedFeeWithERC721Denomination() { final String feeCollector = ACCOUNT_2; final String someARAccount = "someARAccount"; return propertyPreservingHapiSpec("createTokenWithInvalidFixedFeeWithERC721Denomination") @@ -951,7 +951,7 @@ private HapiSpec createTokenWithInvalidFixedFeeWithERC721Denomination() { .error(CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON.name())))); } - private HapiSpec createTokenWithInvalidRoyaltyFee() { + final HapiSpec createTokenWithInvalidRoyaltyFee() { final String feeCollector = ACCOUNT_2; AtomicReference existingToken = new AtomicReference<>(); final String treasuryAndFeeCollectorKey = "treasuryAndFeeCollectorKey"; @@ -1011,7 +1011,7 @@ private HapiSpec createTokenWithInvalidRoyaltyFee() { } // Requires legacy security model, cannot be enabled as @HapiTest without refactoring to use contract keys - private HapiSpec nonFungibleTokenCreateWithFeesHappyPath() { + final HapiSpec nonFungibleTokenCreateWithFeesHappyPath() { final var createTokenNum = new AtomicLong(); final var feeCollector = ACCOUNT_2; final var treasuryAndFeeCollectorKey = "treasuryAndFeeCollectorKey"; @@ -1098,7 +1098,7 @@ private HapiSpec nonFungibleTokenCreateWithFeesHappyPath() { } // Requires legacy security model, cannot be enabled as @HapiTest without refactoring to use contract keys - private HapiSpec fungibleTokenCreateWithFeesHappyPath() { + final HapiSpec fungibleTokenCreateWithFeesHappyPath() { final var createdTokenNum = new AtomicLong(); final var feeCollector = "feeCollector"; final var arEd25519Key = "arEd25519Key"; @@ -1181,7 +1181,7 @@ private HapiSpec fungibleTokenCreateWithFeesHappyPath() { })); } - private HapiSpec etx026AccountWithoutAliasCanMakeEthTxnsDueToAutomaticAliasCreation() { + final HapiSpec etx026AccountWithoutAliasCanMakeEthTxnsDueToAutomaticAliasCreation() { final String ACCOUNT = "account"; return propertyPreservingHapiSpec("etx026AccountWithoutAliasCanMakeEthTxnsDueToAutomaticAliasCreation") .preserving(CRYPTO_CREATE_WITH_ALIAS_ENABLED, CONTRACTS_MAX_NUM_WITH_HAPI_SIGS_ACCESS) @@ -1202,7 +1202,7 @@ private HapiSpec etx026AccountWithoutAliasCanMakeEthTxnsDueToAutomaticAliasCreat } @HapiTest - private HapiSpec transferToCaller() { + final HapiSpec transferToCaller() { final var transferTxn = TRANSFER_TXN; final var sender = "sender"; return defaultHapiSpec("transferToCaller") @@ -1244,7 +1244,7 @@ private HapiSpec transferToCaller() { } @HapiTest - private HapiSpec maxRefundIsMaxGasRefundConfiguredWhenTXGasPriceIsSmaller() { + final HapiSpec maxRefundIsMaxGasRefundConfiguredWhenTXGasPriceIsSmaller() { return defaultHapiSpec("MaxRefundIsMaxGasRefundConfiguredWhenTXGasPriceIsSmaller") .given( overriding(CONTRACTS_MAX_REFUND_PERCENT_OF_GAS_LIMIT, "5"), @@ -1269,7 +1269,7 @@ private HapiSpec maxRefundIsMaxGasRefundConfiguredWhenTXGasPriceIsSmaller() { } @SuppressWarnings("java:S5960") - private HapiSpec contractCreationStoragePriceMatchesFinalExpiry() { + final HapiSpec contractCreationStoragePriceMatchesFinalExpiry() { final var toyMaker = "ToyMaker"; final var createIndirectly = "CreateIndirectly"; final var normalPayer = "normalPayer"; @@ -1310,7 +1310,7 @@ private HapiSpec contractCreationStoragePriceMatchesFinalExpiry() { } @HapiTest - private HapiSpec gasLimitOverMaxGasLimitFailsPrecheck() { + final HapiSpec gasLimitOverMaxGasLimitFailsPrecheck() { return defaultHapiSpec("GasLimitOverMaxGasLimitFailsPrecheck") .given( uploadInitCode(SIMPLE_UPDATE_CONTRACT), @@ -1325,7 +1325,7 @@ private HapiSpec gasLimitOverMaxGasLimitFailsPrecheck() { } @HapiTest - private HapiSpec createGasLimitOverMaxGasLimitFailsPrecheck() { + final HapiSpec createGasLimitOverMaxGasLimitFailsPrecheck() { return defaultHapiSpec("CreateGasLimitOverMaxGasLimitFailsPrecheck") .given(overriding("contracts.maxGasPerSec", "100"), uploadInitCode(EMPTY_CONSTRUCTOR_CONTRACT)) .when() @@ -1335,7 +1335,7 @@ private HapiSpec createGasLimitOverMaxGasLimitFailsPrecheck() { } @HapiTest - private HapiSpec transferZeroHbarsToCaller() { + final HapiSpec transferZeroHbarsToCaller() { final var transferTxn = TRANSFER_TXN; return defaultHapiSpec("transferZeroHbarsToCaller") .given( @@ -1378,7 +1378,7 @@ private HapiSpec transferZeroHbarsToCaller() { } @HapiTest - private HapiSpec resultSizeAffectsFees() { + final HapiSpec resultSizeAffectsFees() { final var contract = "VerboseDeposit"; final var TRANSFER_AMOUNT = 1_000L; BiConsumer resultSizeFormatter = (rcd, txnLog) -> { @@ -1431,7 +1431,7 @@ private HapiSpec resultSizeAffectsFees() { } @HapiTest - private HapiSpec autoAssociationSlotsAppearsInInfo() { + final HapiSpec autoAssociationSlotsAppearsInInfo() { final int maxAutoAssociations = 100; final String CONTRACT = "Multipurpose"; @@ -1449,7 +1449,7 @@ private HapiSpec autoAssociationSlotsAppearsInInfo() { } @HapiTest - private HapiSpec createMaxRefundIsMaxGasRefundConfiguredWhenTXGasPriceIsSmaller() { + final HapiSpec createMaxRefundIsMaxGasRefundConfiguredWhenTXGasPriceIsSmaller() { return defaultHapiSpec("CreateMaxRefundIsMaxGasRefundConfiguredWhenTXGasPriceIsSmaller") .given( overriding(CONTRACTS_MAX_REFUND_PERCENT_OF_GAS_LIMIT1, "5"), @@ -1470,7 +1470,7 @@ private HapiSpec createMaxRefundIsMaxGasRefundConfiguredWhenTXGasPriceIsSmaller( } @HapiTest - private HapiSpec createMinChargeIsTXGasUsedByContractCreate() { + final HapiSpec createMinChargeIsTXGasUsedByContractCreate() { return defaultHapiSpec("CreateMinChargeIsTXGasUsedByContractCreate") .given( overriding(CONTRACTS_MAX_REFUND_PERCENT_OF_GAS_LIMIT1, "100"), @@ -1608,7 +1608,7 @@ HapiSpec temporarySStoreRefundTest() { } @HapiTest - private HapiSpec deletedContractsCannotBeUpdated() { + final HapiSpec deletedContractsCannotBeUpdated() { final var contract = "SelfDestructCallable"; final var beneficiary = "beneficiary"; return defaultHapiSpec("DeletedContractsCannotBeUpdated") @@ -1621,7 +1621,7 @@ private HapiSpec deletedContractsCannotBeUpdated() { } @HapiTest - private HapiSpec canCallPendingContractSafely() { + final HapiSpec canCallPendingContractSafely() { final var numSlots = 64L; final var createBurstSize = 500; final long[] targets = {19, 24}; @@ -1655,7 +1655,7 @@ private HapiSpec canCallPendingContractSafely() { } @HapiTest - private HapiSpec lazyCreateThroughPrecompileNotSupportedWhenFlagDisabled() { + final HapiSpec lazyCreateThroughPrecompileNotSupportedWhenFlagDisabled() { final var CONTRACT = CRYPTO_TRANSFER; final var SENDER = "sender"; final var FUNGIBLE_TOKEN = "fungibleToken"; @@ -1719,7 +1719,7 @@ private HapiSpec lazyCreateThroughPrecompileNotSupportedWhenFlagDisabled() { .then(); } - private HapiSpec evmLazyCreateViaSolidityCall() { + final HapiSpec evmLazyCreateViaSolidityCall() { final var LAZY_CREATE_CONTRACT = "NestedLazyCreateContract"; final var ECDSA_KEY = "ECDSAKey"; final var callLazyCreateFunction = "nestedLazyCreateThenSendMore"; @@ -1785,7 +1785,7 @@ private HapiSpec evmLazyCreateViaSolidityCall() { } // Requires legacy security model, cannot be enabled as @HapiTest without refactoring to use contract keys - private HapiSpec requiresTopLevelSignatureOrApprovalDependingOnControllingProperty() { + final HapiSpec requiresTopLevelSignatureOrApprovalDependingOnControllingProperty() { final var ignoredTopLevelSigTransfer = "ignoredTopLevelSigTransfer"; final var ignoredApprovalTransfer = "ignoredApprovalTransfer"; final var approvedTransfer = "approvedTransfer"; @@ -1909,7 +1909,7 @@ private HapiSpec requiresTopLevelSignatureOrApprovalDependingOnControllingProper } @HapiTest - private HapiSpec evmLazyCreateViaSolidityCallTooManyCreatesFails() { + final HapiSpec evmLazyCreateViaSolidityCallTooManyCreatesFails() { final var LAZY_CREATE_CONTRACT = "NestedLazyCreateContract"; final var ECDSA_KEY = "ECDSAKey"; final var ECDSA_KEY2 = "ECDSAKey2"; @@ -1961,7 +1961,7 @@ private HapiSpec evmLazyCreateViaSolidityCallTooManyCreatesFails() { } @HapiTest - private HapiSpec rejectsCreationAndUpdateOfAssociationsWhenFlagDisabled() { + final HapiSpec rejectsCreationAndUpdateOfAssociationsWhenFlagDisabled() { return propertyPreservingHapiSpec("rejectsCreationAndUpdateOfAssociationsWhenFlagDisabled") .preserving(CONTRACT_ALLOW_ASSOCIATIONS_PROPERTY) .given(overriding(CONTRACT_ALLOW_ASSOCIATIONS_PROPERTY, FALSE)) @@ -1978,7 +1978,7 @@ private HapiSpec rejectsCreationAndUpdateOfAssociationsWhenFlagDisabled() { } @HapiTest - private HapiSpec erc20TransferFromDoesNotWorkIfFlagIsDisabled() { + final HapiSpec erc20TransferFromDoesNotWorkIfFlagIsDisabled() { return defaultHapiSpec("erc20TransferFromDoesNotWorkIfFlagIsDisabled") .given( overriding(HEDERA_ALLOWANCES_IS_ENABLED, FALSE), @@ -2023,7 +2023,7 @@ private HapiSpec erc20TransferFromDoesNotWorkIfFlagIsDisabled() { } @HapiTest - private HapiSpec whitelistPositiveCase() { + final HapiSpec whitelistPositiveCase() { final AtomicLong whitelistedCalleeMirrorNum = new AtomicLong(); final AtomicReference tokenID = new AtomicReference<>(); final AtomicReference attackerMirrorAddr = new AtomicReference<>(); @@ -2074,7 +2074,7 @@ private HapiSpec whitelistPositiveCase() { } @HapiTest - private HapiSpec whitelistNegativeCases() { + final HapiSpec whitelistNegativeCases() { final AtomicLong unlistedCalleeMirrorNum = new AtomicLong(); final AtomicLong whitelistedCalleeMirrorNum = new AtomicLong(); final AtomicReference tokenID = new AtomicReference<>(); @@ -2149,7 +2149,7 @@ private HapiSpec whitelistNegativeCases() { } @HapiTest - private HapiSpec contractCreateNoncesExternalizationHappyPath() { + final HapiSpec contractCreateNoncesExternalizationHappyPath() { final var contract = "NoncesExternalization"; final var contractCreateTxn = "contractCreateTxn"; @@ -2196,7 +2196,7 @@ private HapiSpec contractCreateNoncesExternalizationHappyPath() { } @HapiTest - private HapiSpec contractCreateFollowedByContractCallNoncesExternalization() { + final HapiSpec contractCreateFollowedByContractCallNoncesExternalization() { final var contract = "NoncesExternalization"; final var payer = "payer"; @@ -2298,7 +2298,7 @@ private HapiSpec contractCreateFollowedByContractCallNoncesExternalization() { } @HapiTest - private HapiSpec shouldReturnNullWhenContractsNoncesExternalizationFlagIsDisabled() { + final HapiSpec shouldReturnNullWhenContractsNoncesExternalizationFlagIsDisabled() { final var contract = "NoncesExternalization"; final var payer = "payer"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/LeakyCryptoTestsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/LeakyCryptoTestsSuite.java index 818877efdac8..004700de17b1 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/LeakyCryptoTestsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/leaky/LeakyCryptoTestsSuite.java @@ -217,7 +217,7 @@ public List getSpecsInSuite() { customFeesHaveExpectedAutoCreateInteractions()); } - private HapiSpec autoAssociationPropertiesWorkAsExpected() { + final HapiSpec autoAssociationPropertiesWorkAsExpected() { final var minAutoRenewPeriodPropertyName = "ledger.autoRenewPeriod.minDuration"; final var maxAssociationsPropertyName = "ledger.maxAutoAssociations"; final var shortLivedAutoAssocUser = "shortLivedAutoAssocUser"; @@ -252,7 +252,7 @@ private HapiSpec autoAssociationPropertiesWorkAsExpected() { validateChargedUsd(updateWithExpiredAccount, plusTenSlotsFee)); } - private HapiSpec getsInsufficientPayerBalanceIfSendingAccountCanPayEverythingButServiceFee() { + final HapiSpec getsInsufficientPayerBalanceIfSendingAccountCanPayEverythingButServiceFee() { final var civilian = "civilian"; final var creation = "creation"; final var gasToOffer = 128_000L; @@ -310,7 +310,7 @@ private HapiSpec getsInsufficientPayerBalanceIfSendingAccountCanPayEverythingBut .hasKnownStatus(INSUFFICIENT_PAYER_BALANCE))); } - private HapiSpec scheduledCryptoApproveAllowanceWaitForExpiryTrue() { + final HapiSpec scheduledCryptoApproveAllowanceWaitForExpiryTrue() { return defaultHapiSpec("ScheduledCryptoApproveAllowanceWaitForExpiryTrue") .given( newKeyNamed(SUPPLY_KEY), @@ -388,7 +388,7 @@ private HapiSpec scheduledCryptoApproveAllowanceWaitForExpiryTrue() { getTokenNftInfo(NON_FUNGIBLE_TOKEN, 2L).hasSpenderID(SPENDER)); } - private HapiSpec txnsUsingHip583FunctionalitiesAreNotAcceptedWhenFlagsAreDisabled() { + final HapiSpec txnsUsingHip583FunctionalitiesAreNotAcceptedWhenFlagsAreDisabled() { final Map startingProps = new HashMap<>(); return defaultHapiSpec("txnsUsingHip583FunctionalitiesAreNotAcceptedWhenFlagsAreDisabled") .given( @@ -437,7 +437,7 @@ private HapiSpec txnsUsingHip583FunctionalitiesAreNotAcceptedWhenFlagsAreDisable .then(overridingAllOfDeferred(() -> startingProps)); } - private HapiSpec maxAutoAssociationSpec() { + final HapiSpec maxAutoAssociationSpec() { final int MONOGAMOUS_NETWORK = 1; final int maxAutoAssociations = 100; final int ADVENTUROUS_NETWORK = 1_000; @@ -496,7 +496,7 @@ public HapiSpec canDissociateFromMultipleExpiredTokens() { overriding(LEDGER_AUTO_RENEW_PERIOD_MIN_DURATION, DEFAULT_MIN_AUTO_RENEW_PERIOD)); } - private HapiSpec cannotExceedAccountAllowanceLimit() { + final HapiSpec cannotExceedAccountAllowanceLimit() { return defaultHapiSpec("CannotExceedAccountAllowanceLimit") .given( overridingTwo( @@ -563,7 +563,7 @@ private HapiSpec cannotExceedAccountAllowanceLimit() { HEDERA_ALLOWANCES_MAX_ACCOUNT_LIMIT, "100")); } - private HapiSpec createAnAccountWithEVMAddressAliasAndECKey() { + final HapiSpec createAnAccountWithEVMAddressAliasAndECKey() { final Map startingProps = new HashMap<>(); return defaultHapiSpec("CreateAnAccountWithEVMAddressAliasAndECKey") .given( @@ -622,7 +622,7 @@ private HapiSpec createAnAccountWithEVMAddressAliasAndECKey() { .then(overridingAllOfDeferred(() -> startingProps)); } - private HapiSpec createAnAccountWithEVMAddress() { + final HapiSpec createAnAccountWithEVMAddress() { return propertyPreservingHapiSpec("CreateAnAccountWithEVMAddress") .preserving(LAZY_CREATION_ENABLED, CRYPTO_CREATE_WITH_ALIAS_ENABLED) .given( @@ -643,7 +643,7 @@ private HapiSpec createAnAccountWithEVMAddress() { .then(); } - private HapiSpec cannotExceedAllowancesTransactionLimit() { + final HapiSpec cannotExceedAllowancesTransactionLimit() { return defaultHapiSpec("CannotExceedAllowancesTransactionLimit") .given( newKeyNamed(SUPPLY_KEY), @@ -719,7 +719,7 @@ private HapiSpec cannotExceedAllowancesTransactionLimit() { HEDERA_ALLOWANCES_MAX_ACCOUNT_LIMIT, "100")); } - private HapiSpec hollowAccountCompletionNotAcceptedWhenFlagIsDisabled() { + final HapiSpec hollowAccountCompletionNotAcceptedWhenFlagIsDisabled() { final Map startingProps = new HashMap<>(); return defaultHapiSpec("HollowAccountCompletionNotAcceptedWhenFlagIsDisabled") .given( @@ -765,7 +765,7 @@ private HapiSpec hollowAccountCompletionNotAcceptedWhenFlagIsDisabled() { })); } - private HapiSpec hollowAccountCreationChargesExpectedFees() { + final HapiSpec hollowAccountCreationChargesExpectedFees() { final long REDUCED_NODE_FEE = 2L; final long REDUCED_NETWORK_FEE = 3L; final long REDUCED_SERVICE_FEE = 3L; @@ -832,7 +832,7 @@ private HapiSpec hollowAccountCreationChargesExpectedFees() { .then(uploadDefaultFeeSchedules(GENESIS)); } - private HapiSpec hollowAccountCompletionWithEthereumTransaction() { + final HapiSpec hollowAccountCompletionWithEthereumTransaction() { final Map startingProps = new HashMap<>(); final String CONTRACT = "Fuse"; return defaultHapiSpec("HollowAccountCompletionWithEthereumTransaction") @@ -881,7 +881,7 @@ private HapiSpec hollowAccountCompletionWithEthereumTransaction() { })); } - private HapiSpec contractDeployAfterEthereumTransferLazyCreate() { + final HapiSpec contractDeployAfterEthereumTransferLazyCreate() { final var RECIPIENT_KEY = LAZY_ACCOUNT_RECIPIENT; final var lazyCreateTxn = PAY_TXN; return propertyPreservingHapiSpec("contractDeployAfterEthereumTransferLazyCreate") @@ -930,7 +930,7 @@ private HapiSpec contractDeployAfterEthereumTransferLazyCreate() { })); } - private HapiSpec contractCallAfterEthereumTransferLazyCreate() { + final HapiSpec contractCallAfterEthereumTransferLazyCreate() { final var RECIPIENT_KEY = LAZY_ACCOUNT_RECIPIENT; final var lazyCreateTxn = PAY_TXN; return propertyPreservingHapiSpec("contractCallAfterEthereumTransferLazyCreate") @@ -979,7 +979,7 @@ private HapiSpec contractCallAfterEthereumTransferLazyCreate() { })); } - private HapiSpec lazyCreateViaEthereumCryptoTransfer() { + final HapiSpec lazyCreateViaEthereumCryptoTransfer() { final var RECIPIENT_KEY = LAZY_ACCOUNT_RECIPIENT; final var lazyCreateTxn = PAY_TXN; final var failedLazyCreateTxn = "failedLazyCreateTxn"; @@ -1062,7 +1062,7 @@ private HapiSpec lazyCreateViaEthereumCryptoTransfer() { })); } - private HapiSpec hollowAccountCompletionWithSimultaniousPropertiesUpdate() { + final HapiSpec hollowAccountCompletionWithSimultaniousPropertiesUpdate() { return propertyPreservingHapiSpec("hollowAccountCompletionWithSimultaniousPropertiesUpdate") .preserving(LAZY_CREATION_ENABLED) .given( @@ -1175,7 +1175,7 @@ public HapiSpec autoAssociationWorksForContracts() { } @HapiTest - private HapiSpec customFeesHaveExpectedAutoCreateInteractions() { + final HapiSpec customFeesHaveExpectedAutoCreateInteractions() { final var nftWithRoyaltyNoFallback = "nftWithRoyaltyNoFallback"; final var nftWithRoyaltyPlusHtsFallback = "nftWithRoyaltyPlusFallback"; final var nftWithRoyaltyPlusHbarFallback = "nftWithRoyaltyPlusHbarFallback"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/meta/VersionInfoSpec.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/meta/VersionInfoSpec.java index dea022fbbc9a..ca52fe668efd 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/meta/VersionInfoSpec.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/meta/VersionInfoSpec.java @@ -59,7 +59,7 @@ public List getSpecsInSuite() { @BddTestNameDoesNotMatchMethodName @HapiTest - private HapiSpec discoversExpectedVersions() { + final HapiSpec discoversExpectedVersions() { if (specConfig != null) { return customHapiSpec("getVersionInfo") .withProperties(specConfig) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/CannotDeleteSystemEntitiesSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/CannotDeleteSystemEntitiesSuite.java index 7ca550c5da4f..0d0e1c50c145 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/CannotDeleteSystemEntitiesSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/CannotDeleteSystemEntitiesSuite.java @@ -77,7 +77,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec ensureSystemAccountsHaveSomeFunds() { + final HapiSpec ensureSystemAccountsHaveSomeFunds() { return defaultHapiSpec("EnsureSystemAccountsHaveSomeFunds") .given() .when() @@ -89,81 +89,81 @@ private HapiSpec ensureSystemAccountsHaveSomeFunds() { } @HapiTest - private HapiSpec genesisCannotDeleteSystemAccountsFrom1To100() { + final HapiSpec genesisCannotDeleteSystemAccountsFrom1To100() { return systemUserCannotDeleteSystemAccounts(1, 100, GENESIS); } @HapiTest - private HapiSpec genesisCannotDeleteSystemAccountsFrom700To750() { + final HapiSpec genesisCannotDeleteSystemAccountsFrom700To750() { return systemUserCannotDeleteSystemAccounts(700, 750, GENESIS); } @HapiTest - private HapiSpec systemAdminCannotDeleteSystemAccountsFrom1To100() { + final HapiSpec systemAdminCannotDeleteSystemAccountsFrom1To100() { return systemUserCannotDeleteSystemAccounts(1, 100, SYSTEM_ADMIN); } @HapiTest - private HapiSpec systemAdminCannotDeleteSystemAccountsFrom700To750() { + final HapiSpec systemAdminCannotDeleteSystemAccountsFrom700To750() { return systemUserCannotDeleteSystemAccounts(700, 750, SYSTEM_ADMIN); } @HapiTest - private HapiSpec systemDeleteAdminCannotDeleteSystemAccountsFrom1To100() { + final HapiSpec systemDeleteAdminCannotDeleteSystemAccountsFrom1To100() { return systemUserCannotDeleteSystemAccounts(1, 100, SYSTEM_DELETE_ADMIN); } @HapiTest - private HapiSpec systemDeleteAdminCannotDeleteSystemAccountsFrom700To750() { + final HapiSpec systemDeleteAdminCannotDeleteSystemAccountsFrom700To750() { return systemUserCannotDeleteSystemAccounts(700, 750, SYSTEM_DELETE_ADMIN); } @HapiTest - private HapiSpec normalUserCannotDeleteSystemAccountsFrom1To100() { + final HapiSpec normalUserCannotDeleteSystemAccountsFrom1To100() { return normalUserCannotDeleteSystemAccounts(1, 100); } @HapiTest - private HapiSpec normalUserCannotDeleteSystemAccountsFrom700To750() { + final HapiSpec normalUserCannotDeleteSystemAccountsFrom700To750() { return normalUserCannotDeleteSystemAccounts(700, 750); } @HapiTest - private HapiSpec genesisCannotDeleteSystemFileIds() { + final HapiSpec genesisCannotDeleteSystemFileIds() { return systemUserCannotDeleteSystemFiles(sysFileIds, GENESIS); } @HapiTest - private HapiSpec systemAdminCannotDeleteSystemFileIds() { + final HapiSpec systemAdminCannotDeleteSystemFileIds() { return systemUserCannotDeleteSystemFiles(sysFileIds, SYSTEM_ADMIN); } @HapiTest - private HapiSpec systemDeleteAdminCannotDeleteSystemFileIds() { + final HapiSpec systemDeleteAdminCannotDeleteSystemFileIds() { return systemUserCannotDeleteSystemFiles(sysFileIds, SYSTEM_DELETE_ADMIN); } @HapiTest - private HapiSpec normalUserCannotDeleteSystemFileIds() { + final HapiSpec normalUserCannotDeleteSystemFileIds() { return normalUserCannotDeleteSystemFiles(sysFileIds); } @HapiTest - private HapiSpec genesisCannotSystemFileDeleteFileIds() { + final HapiSpec genesisCannotSystemFileDeleteFileIds() { return systemDeleteCannotDeleteSystemFiles(sysFileIds, GENESIS); } @HapiTest - private HapiSpec systemAdminCannotSystemFileDeleteFileIds() { + final HapiSpec systemAdminCannotSystemFileDeleteFileIds() { return systemDeleteCannotDeleteSystemFiles(sysFileIds, SYSTEM_ADMIN); } @HapiTest - private HapiSpec systemDeleteAdminCannotSystemFileDeleteFileIds() { + final HapiSpec systemDeleteAdminCannotSystemFileDeleteFileIds() { return systemDeleteCannotDeleteSystemFiles(sysFileIds, SYSTEM_DELETE_ADMIN); } - private HapiSpec systemUserCannotDeleteSystemAccounts(int firstAccount, int lastAccount, String sysUser) { + final HapiSpec systemUserCannotDeleteSystemAccounts(int firstAccount, int lastAccount, String sysUser) { return defaultHapiSpec("systemUserCannotDeleteSystemAccounts") .given(cryptoCreate("unluckyReceiver").balance(0L)) .when() @@ -176,7 +176,7 @@ private HapiSpec systemUserCannotDeleteSystemAccounts(int firstAccount, int last .toArray(HapiSpecOperation[]::new))); } - private HapiSpec normalUserCannotDeleteSystemAccounts(int firstAccount, int lastAccount) { + final HapiSpec normalUserCannotDeleteSystemAccounts(int firstAccount, int lastAccount) { return defaultHapiSpec("normalUserCannotDeleteSystemAccounts") .given(newKeyNamed("normalKey"), cryptoCreate("unluckyReceiver").balance(0L)) .when(cryptoCreate("normalUser").key("normalKey").balance(1_000_000_000L)) @@ -189,7 +189,7 @@ private HapiSpec normalUserCannotDeleteSystemAccounts(int firstAccount, int last .toArray(HapiSpecOperation[]::new))); } - private HapiSpec systemUserCannotDeleteSystemFiles(int[] fileIds, String sysUser) { + final HapiSpec systemUserCannotDeleteSystemFiles(int[] fileIds, String sysUser) { return defaultHapiSpec("systemUserCannotDeleteSystemFiles") .given() .when() @@ -201,7 +201,7 @@ private HapiSpec systemUserCannotDeleteSystemFiles(int[] fileIds, String sysUser .toArray(HapiSpecOperation[]::new))); } - private HapiSpec normalUserCannotDeleteSystemFiles(int[] fileIds) { + final HapiSpec normalUserCannotDeleteSystemFiles(int[] fileIds) { return defaultHapiSpec("normalUserCannotDeleteSystemFiles") .given(newKeyNamed("normalKey")) .when(cryptoCreate("normalUser").key("normalKey").balance(1_000_000_000L)) @@ -213,7 +213,7 @@ private HapiSpec normalUserCannotDeleteSystemFiles(int[] fileIds) { .toArray(HapiSpecOperation[]::new))); } - private HapiSpec systemDeleteCannotDeleteSystemFiles(int[] fileIds, String sysUser) { + final HapiSpec systemDeleteCannotDeleteSystemFiles(int[] fileIds, String sysUser) { return defaultHapiSpec("systemDeleteCannotDeleteSystemFiles") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ConsensusQueriesStressTests.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ConsensusQueriesStressTests.java index d6970f8582d5..0bbd2807cdf6 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ConsensusQueriesStressTests.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ConsensusQueriesStressTests.java @@ -61,7 +61,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec getTopicInfoStress() { + final HapiSpec getTopicInfoStress() { return defaultHapiSpec("GetTopicInfoStress") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ContractQueriesStressTests.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ContractQueriesStressTests.java index 93278176d39d..d5fd5378b70b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ContractQueriesStressTests.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ContractQueriesStressTests.java @@ -72,7 +72,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec getContractInfoStress() { + final HapiSpec getContractInfoStress() { return defaultHapiSpec("GetContractInfoStress") .given() .when() @@ -83,7 +83,7 @@ private HapiSpec getContractInfoStress() { .maxOpsPerSec(maxOpsPerSec::get)); } - private HapiSpec getContractBytecodeStress() { + final HapiSpec getContractBytecodeStress() { return defaultHapiSpec("GetAccountRecordsStress") .given() .when() @@ -94,7 +94,7 @@ private HapiSpec getContractBytecodeStress() { .maxOpsPerSec(maxOpsPerSec::get)); } - private HapiSpec contractCallLocalStress() { + final HapiSpec contractCallLocalStress() { return defaultHapiSpec("ContractCallLocalStress") .given() .when() @@ -105,7 +105,7 @@ private HapiSpec contractCallLocalStress() { .maxOpsPerSec(maxOpsPerSec::get)); } - private HapiSpec getContractRecordsStress() { + final HapiSpec getContractRecordsStress() { return defaultHapiSpec("GetContractRecordsStress") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/CryptoQueriesStressTests.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/CryptoQueriesStressTests.java index 492ca12cb6e0..36070baa4805 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/CryptoQueriesStressTests.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/CryptoQueriesStressTests.java @@ -67,7 +67,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec getAccountBalanceStress() { + final HapiSpec getAccountBalanceStress() { return defaultHapiSpec("getAccountBalanceStress") .given() .when() @@ -79,7 +79,7 @@ private HapiSpec getAccountBalanceStress() { } @HapiTest - private HapiSpec getAccountInfoStress() { + final HapiSpec getAccountInfoStress() { return defaultHapiSpec("getAccountInfoStress") .given() .when() @@ -91,7 +91,7 @@ private HapiSpec getAccountInfoStress() { } @HapiTest - private HapiSpec getAccountRecordsStress() { + final HapiSpec getAccountRecordsStress() { return defaultHapiSpec("getAccountRecordsStress") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/FileQueriesStressTests.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/FileQueriesStressTests.java index dd45cddeac89..aae6beb97ff8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/FileQueriesStressTests.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/FileQueriesStressTests.java @@ -62,7 +62,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec getFileContentsStress() { + final HapiSpec getFileContentsStress() { return defaultHapiSpec("getFileContentsStress") .given() .when() @@ -74,7 +74,7 @@ private HapiSpec getFileContentsStress() { } @HapiTest - private HapiSpec getFileInfoStress() { + final HapiSpec getFileInfoStress() { return defaultHapiSpec("getFileInfoStress") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/FreezeRekeyedState.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/FreezeRekeyedState.java index e858ff9fbf22..ba1ab98c7c10 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/FreezeRekeyedState.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/FreezeRekeyedState.java @@ -46,7 +46,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec freezeWithNewTreasuryKey() { + final HapiSpec freezeWithNewTreasuryKey() { return customHapiSpec("FreezeWithNewTreasuryKey") .withProperties(Map.of( "nodes", diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/GuidedTourRemoteSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/GuidedTourRemoteSuite.java index 84d1220cb78e..fd8e7e892360 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/GuidedTourRemoteSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/GuidedTourRemoteSuite.java @@ -95,7 +95,7 @@ private List guidedTour() { * * @return the example spec */ - private HapiSpec rekeyAccountWith2Of3Choice() { + final HapiSpec rekeyAccountWith2Of3Choice() { // The account to re-key final var target = "0.0.1234"; // The PEM files with the involved keys @@ -133,7 +133,7 @@ private HapiSpec rekeyAccountWith2Of3Choice() { .signedBy(DEFAULT_PAYER, extantKey)); } - private HapiSpec balanceLookupContractWorks() { + final HapiSpec balanceLookupContractWorks() { final long ACTUAL_BALANCE = 1_234L; final var contract = "BalanceLookup"; @@ -156,7 +156,7 @@ private HapiSpec balanceLookupContractWorks() { isLiteralResult(new Object[] {BigInteger.valueOf(ACTUAL_BALANCE)})))); } - private HapiSpec topLevelHederaKeyMustBeActive() { + final HapiSpec topLevelHederaKeyMustBeActive() { KeyShape waclShape = listOf(SIMPLE, threshOf(2, 3)); SigControl updateSigControl = waclShape.signedWith(sigs(ON, sigs(ON, OFF, OFF))); @@ -177,7 +177,7 @@ private HapiSpec topLevelHederaKeyMustBeActive() { NOTE: KeyLists lower in the key hierarchy still require all child keys to have active signatures. */ - private HapiSpec topLevelListBehavesAsRevocationService() { + final HapiSpec topLevelListBehavesAsRevocationService() { KeyShape waclShape = listOf(SIMPLE, threshOf(2, 3)); SigControl deleteSigControl = waclShape.signedWith(sigs(OFF, sigs(ON, ON, OFF))); @@ -188,7 +188,7 @@ private HapiSpec topLevelListBehavesAsRevocationService() { .then(fileDelete(TARGET).sigControl(ControlForKey.forKey(TARGET, deleteSigControl))); } - private HapiSpec updateWithInvalidatedKeyFailsInHandle() { + final HapiSpec updateWithInvalidatedKeyFailsInHandle() { return customHapiSpec("UpdateWithInvalidatedKeyFailsIHandle") .withProperties(Map.of("host", HOST)) .given( @@ -203,7 +203,7 @@ private HapiSpec updateWithInvalidatedKeyFailsInHandle() { .hasKnownStatus(INVALID_SIGNATURE)); } - private HapiSpec updateWithInvalidKeyFailsInPrecheck() { + final HapiSpec updateWithInvalidKeyFailsInPrecheck() { KeyShape keyShape = listOf(3); return HapiSpec.customHapiSpec("UpdateWithInvalidKeyFailsInPrecheck") @@ -216,7 +216,7 @@ private HapiSpec updateWithInvalidKeyFailsInPrecheck() { .hasPrecheck(INVALID_SIGNATURE)); } - private HapiSpec transferChangesBalance() { + final HapiSpec transferChangesBalance() { final long AMOUNT = 1_000L; return HapiSpec.customHapiSpec("TransferChangesBalance") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/InvalidgRPCValuesTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/InvalidgRPCValuesTest.java index 1a7ca1e16c79..9a9ff3bc8835 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/InvalidgRPCValuesTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/InvalidgRPCValuesTest.java @@ -50,7 +50,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec invalidIdCheck() { + final HapiSpec invalidIdCheck() { final long MAX_NUM_ALLOWED = 0xFFFFFFFFL; final String invalidMaxId = MAX_NUM_ALLOWED + 1 + ".2.3"; return defaultHapiSpec("TransferWithInvalidAccount") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/MemoValidation.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/MemoValidation.java index 031a163577bd..5fc322837456 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/MemoValidation.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/MemoValidation.java @@ -83,7 +83,7 @@ public List getSpecsInSuite() { contractOps()); } - private HapiSpec contractOps() { + final HapiSpec contractOps() { final var contract = "CreateTrivial"; return defaultHapiSpec("MemoValidationsOnContractOps") .given(uploadInitCode(contract), contractCreate(contract).omitAdminKey()) @@ -109,7 +109,7 @@ private HapiSpec contractOps() { .hasPrecheck(MEMO_TOO_LONG)); } - private HapiSpec tokenOps() { + final HapiSpec tokenOps() { return defaultHapiSpec("MemoValidationsOnTokenOps") .given( cryptoCreate("firstUser"), @@ -140,7 +140,7 @@ private HapiSpec tokenOps() { .hasPrecheck(MEMO_TOO_LONG)); } - private HapiSpec scheduleOps() { + final HapiSpec scheduleOps() { final String defaultWhitelist = HapiSpecSetup.getDefaultNodeProps().get(SCHEDULING_WHITELIST); final var toScheduleOp1 = cryptoCreate("test"); final var toScheduleOp2 = cryptoCreate("test").balance(1L); @@ -179,7 +179,7 @@ private HapiSpec scheduleOps() { overriding(SCHEDULING_WHITELIST, defaultWhitelist)); } - private HapiSpec topicOps() { + final HapiSpec topicOps() { return defaultHapiSpec("MemoValidationsOnTopicOps") .given( newKeyNamed(ADMIN_KEY), @@ -209,7 +209,7 @@ private HapiSpec topicOps() { .hasKnownStatus(MEMO_TOO_LONG)); } - private HapiSpec cryptoOps() { + final HapiSpec cryptoOps() { return defaultHapiSpec("MemoValidationsOnCryptoOps") .given(cryptoCreate(primary).blankMemo()) .when( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/MixedOpsTransactionsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/MixedOpsTransactionsSuite.java index 9be205d3b894..5abf353a6ac8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/MixedOpsTransactionsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/MixedOpsTransactionsSuite.java @@ -55,14 +55,14 @@ public List getSpecsInSuite() { }); } - private HapiSpec triggerSavedScheduleTxn() { + final HapiSpec triggerSavedScheduleTxn() { return HapiSpec.defaultHapiSpec("triggerSavedScheduleTxn") .given(getAccountBalance("0.0.1002").hasTinyBars(0L)) .when(scheduleSign("0.0.1016").logged().alsoSigningWith(GENESIS)) .then(getAccountBalance("0.0.1002").hasTinyBars(1L)); } // Used to generate state with mixed operations - private HapiSpec createStateWithMixedOps() { + final HapiSpec createStateWithMixedOps() { long ONE_YEAR_IN_SECS = 365 * 24 * 60 * 60; int numScheduledTxns = 10; return HapiSpec.defaultHapiSpec("createStateWithMixedOps") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/OneOfEveryTransaction.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/OneOfEveryTransaction.java index 4954ec9d5df3..0dba755e695f 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/OneOfEveryTransaction.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/OneOfEveryTransaction.java @@ -67,7 +67,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec doThings() { + final HapiSpec doThings() { /* Crypto signing */ var complex = KeyShape.threshOf(1, KeyShape.listOf(3), KeyShape.threshOf(1, 3)); /* File signing */ diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/PerpetualTransfers.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/PerpetualTransfers.java index 584e45117b62..2ba870341f65 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/PerpetualTransfers.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/PerpetualTransfers.java @@ -59,7 +59,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec canTransferBackAndForthForever() { + final HapiSpec canTransferBackAndForthForever() { return HapiSpec.defaultHapiSpec("CanTransferBackAndForthForever") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/PersistenceDevSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/PersistenceDevSuite.java index c06c47d0bcf9..83e2c9ec1af0 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/PersistenceDevSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/PersistenceDevSuite.java @@ -42,7 +42,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec testEntityLoading() { + final HapiSpec testEntityLoading() { return customHapiSpec("TestEntityLoading") .withProperties(Map.of("persistentEntities.dir.path", "persistent-entities/")) .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/R5BugChecks.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/R5BugChecks.java index 22be1398b185..feaedf034077 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/R5BugChecks.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/R5BugChecks.java @@ -99,7 +99,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec cannotUseThresholdWithM0() { + final HapiSpec cannotUseThresholdWithM0() { KeyShape invalid = listOf(SIMPLE, SIMPLE, threshOf(0, 3)); return defaultHapiSpec("CannotUseThresholdWithM0") @@ -108,7 +108,7 @@ private HapiSpec cannotUseThresholdWithM0() { .then(cryptoCreate(SKETCHY).keyShape(invalid).hasPrecheck(BAD_ENCODING)); } - private HapiSpec cannotTransferEntirePayerBalance() { + final HapiSpec cannotTransferEntirePayerBalance() { var balance = 1_234_567L; return defaultHapiSpec("CannotTransferEntirePayerBalance") .given(cryptoCreate(SKETCHY).balance(balance)) @@ -118,21 +118,21 @@ private HapiSpec cannotTransferEntirePayerBalance() { .hasPrecheck(INSUFFICIENT_PAYER_BALANCE)); } - private HapiSpec canGetDeletedFileInfo() { + final HapiSpec canGetDeletedFileInfo() { return defaultHapiSpec("CanGetDeletedFileInfo") .given(fileCreate("tbd")) .when(fileDelete("tbd")) .then(getFileInfo("tbd").hasCostAnswerPrecheck(OK).hasAnswerOnlyPrecheck(OK)); } - private HapiSpec costAnswerGetAccountInfoRejectsInvalidId() { + final HapiSpec costAnswerGetAccountInfoRejectsInvalidId() { return defaultHapiSpec("CostAnswerGetAccountInfoRejectsInvalidId") .given() .when() .then(getAccountInfo("1.2.3").hasCostAnswerPrecheck(INVALID_ACCOUNT_ID)); } - private HapiSpec contractCannotTransferToReceiverSigRequired() { + final HapiSpec contractCannotTransferToReceiverSigRequired() { return defaultHapiSpec("ContractCannotTransferToReceiverSigRequired") .given( uploadInitCode(MULTIPURPOSE), @@ -144,7 +144,7 @@ private HapiSpec contractCannotTransferToReceiverSigRequired() { .hasKnownStatus(INVALID_SIGNATURE)); } - private HapiSpec enforcesSigRequirements() { + final HapiSpec enforcesSigRequirements() { final var contract = "LastTrackingSender"; KeyShape complexSrShape = listOf(SIMPLE, threshOf(1, 3)); SigControl activeSig = complexSrShape.signedWith(sigs(ON, sigs(OFF, OFF, ON))); @@ -192,7 +192,7 @@ private HapiSpec enforcesSigRequirements() { getAccountBalance("noSr").hasTinyBars(1L)); } - private HapiSpec cannotTransferToDeleted() { + final HapiSpec cannotTransferToDeleted() { final var contract = "LastTrackingSender"; return defaultHapiSpec("CannotTransferToDeleted") .given( @@ -210,7 +210,7 @@ private HapiSpec cannotTransferToDeleted() { .hasKnownStatus(INVALID_SOLIDITY_ADDRESS)); } - private HapiSpec genesisUpdatesFeesForFree() { + final HapiSpec genesisUpdatesFeesForFree() { AtomicReference schedulePart1 = new AtomicReference<>(); AtomicReference schedulePart2 = new AtomicReference<>(); @@ -243,7 +243,7 @@ private HapiSpec genesisUpdatesFeesForFree() { } /* Run from clean local environment to test need for state migration vis-a-vis JContractFunctionResult. */ - private HapiSpec genRecordWithCreations() { + final HapiSpec genRecordWithCreations() { final var contract = "Fuse"; return defaultHapiSpec("CreateRecordViaExpensiveSubmit") .given(uploadInitCode(contract), contractCreate(contract)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/RekeySavedStateTreasury.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/RekeySavedStateTreasury.java index 8b57d42bbcd6..89af26b029a3 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/RekeySavedStateTreasury.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/RekeySavedStateTreasury.java @@ -50,7 +50,7 @@ public List getSpecsInSuite() { static final String newTreasuryPassphrase = "passphrase"; static final String devKeyPemLoc = "devGenesisKeypair.pem"; - private HapiSpec rekeyTreasury() { + final HapiSpec rekeyTreasury() { final var pemLocForOriginalTreasuryKey = "stabletestnet-account2.pem"; final var passphraseForOriginalPemLoc = ""; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/UtilVerbChecks.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/UtilVerbChecks.java index 871845e60ada..2b6351a1bf75 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/UtilVerbChecks.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/UtilVerbChecks.java @@ -53,7 +53,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec testMakingFree() { + final HapiSpec testMakingFree() { return defaultHapiSpec("TestMakingFree") .given( cryptoCreate("civilian"), @@ -68,7 +68,7 @@ private HapiSpec testMakingFree() { .hasAnswerOnlyPrecheck(OK)); } - private HapiSpec testDissociation() { + final HapiSpec testDissociation() { return defaultHapiSpec("TestDissociation") .given( cryptoCreate("t"), @@ -82,7 +82,7 @@ private HapiSpec testDissociation() { .then(getAccountInfo("somebody").hasNoTokenRelationship("a").hasNoTokenRelationship("b")); } - private HapiSpec testLivenessTimeout() { + final HapiSpec testLivenessTimeout() { return defaultHapiSpec("TestLivenessTimeout") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ZeroStakeNodeTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ZeroStakeNodeTest.java index 06191a6b1355..bcbe0560870a 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ZeroStakeNodeTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/misc/ZeroStakeNodeTest.java @@ -66,7 +66,7 @@ public List getSpecsInSuite() { * node ids of the network with zero stake nodes. Assumes that node 0.0.7 and node 0.0.8 are * started with zero stake in a 6 node network. */ - private HapiSpec zeroStakeBehavesAsExpectedJRS() { + final HapiSpec zeroStakeBehavesAsExpectedJRS() { return defaultHapiSpec("zeroStakeBehavesAsExpectedJRS") .given( cryptoCreate("sponsor"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/AccountBalancesClientSaveLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/AccountBalancesClientSaveLoadTest.java index d3af30d8ee9b..7a9414e693bb 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/AccountBalancesClientSaveLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/AccountBalancesClientSaveLoadTest.java @@ -113,7 +113,7 @@ public List getSpecsInSuite() { return List.of(runAccountBalancesClientSaveLoadTest()); } - private HapiSpec runAccountBalancesClientSaveLoadTest() { + final HapiSpec runAccountBalancesClientSaveLoadTest() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); var throttlesForJRS = protoDefsFromResource("testSystemFiles/throttles-for-acct-balances-tests.json"); return defaultHapiSpec("AccountBalancesClientSaveLoadTest") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/AdjustFeeScheduleSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/AdjustFeeScheduleSuite.java index cbc14d0cb762..d5aa7ebddddd 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/AdjustFeeScheduleSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/AdjustFeeScheduleSuite.java @@ -48,7 +48,7 @@ public List getSpecsInSuite() { return List.of(updateFeesFor()); } - private HapiSpec updateFeesFor() { + final HapiSpec updateFeesFor() { final var fixedFee = ONE_HUNDRED_HBARS; return customHapiSpec("updateFees") .withProperties(Map.of("fees.useFixedOffer", "true", "fees.fixedOffer", "" + fixedFee)) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/QueryOnlyLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/QueryOnlyLoadTest.java index a07f8e4940b3..13fd920e39ab 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/QueryOnlyLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/QueryOnlyLoadTest.java @@ -79,7 +79,7 @@ public List getSpecsInSuite() { return List.of(new HapiSpec[] {runQueryLoadTest()}); } - private HapiSpec runQueryLoadTest() { + final HapiSpec runQueryLoadTest() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); Supplier mixedQueries = () -> new HapiSpecOperation[] { diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/ContractCallLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/ContractCallLoadTest.java index 564fb7e44747..abfe2ba9dba3 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/ContractCallLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/ContractCallLoadTest.java @@ -54,7 +54,7 @@ public List getSpecsInSuite() { return List.of(runContractCalls()); } - private HapiSpec runContractCalls() { + final HapiSpec runContractCalls() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); final AtomicInteger submittedSoFar = new AtomicInteger(0); final String DEPOSIT_MEMO = "So we out-danced thought, body perfection brought..."; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/FibonacciPlusLoadProvider.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/FibonacciPlusLoadProvider.java index 81c3313951fc..a4f9301383f0 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/FibonacciPlusLoadProvider.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/FibonacciPlusLoadProvider.java @@ -157,7 +157,7 @@ public List getSpecsInSuite() { return List.of(justDoOne(), addFibNums()); } - private HapiSpec addFibNums() { + final HapiSpec addFibNums() { return defaultHapiSpec("AddFibNums") .given( stdMgmtOf(duration, unit, maxOpsPerSec, SUITE_PROPS_PREFIX), @@ -355,7 +355,7 @@ private void observeExposedGas(final long gas) { gasUsed.addAndGet(gas); } - private HapiSpec justDoOne() { + final HapiSpec justDoOne() { final var civilian = "civilian"; final int[] firstTargets = {19, 24}; final int[] secondTargets = {30, 31}; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/opcodes/SStoreOperationLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/opcodes/SStoreOperationLoadTest.java index ad6da79c7984..2cb7944c85db 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/opcodes/SStoreOperationLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/contract/opcodes/SStoreOperationLoadTest.java @@ -62,7 +62,7 @@ public List getSpecsInSuite() { return List.of(runContractCalls()); } - private HapiSpec runContractCalls() { + final HapiSpec runContractCalls() { final var contract = "BigArray"; PerfTestLoadSettings settings = new PerfTestLoadSettings(); final AtomicInteger submittedSoFar = new AtomicInteger(0); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoAllowancePerfSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoAllowancePerfSuite.java index 66e21a3bf68f..7b2cc2012aad 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoAllowancePerfSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoAllowancePerfSuite.java @@ -45,7 +45,7 @@ public List getSpecsInSuite() { return List.of(runCryptoCreatesAndTokenCreates(), runCryptoAllowances()); } - private HapiSpec runCryptoCreatesAndTokenCreates() { + final HapiSpec runCryptoCreatesAndTokenCreates() { final int NUM_CREATES = 5000; return defaultHapiSpec("runCryptoCreatesAndTokenCreates") .given() @@ -96,7 +96,7 @@ private HapiSpec runCryptoCreatesAndTokenCreates() { .deferStatusResolution()))); } - private HapiSpec runCryptoAllowances() { + final HapiSpec runCryptoAllowances() { final int NUM_ALLOWANCES = 5000; return defaultHapiSpec("runCryptoAllowances") .given() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoCreatePerfSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoCreatePerfSuite.java index 55aac684139c..400da69c14a7 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoCreatePerfSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoCreatePerfSuite.java @@ -40,7 +40,7 @@ public List getSpecsInSuite() { return List.of(runCryptoCreates()); } - private HapiSpec runCryptoCreates() { + final HapiSpec runCryptoCreates() { final int NUM_CREATES = 1000000; return defaultHapiSpec("cryptoCreatePerf") .given() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoTransferPerfSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoTransferPerfSuite.java index 52f4065ee187..15f49d3522c9 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoTransferPerfSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoTransferPerfSuite.java @@ -51,7 +51,7 @@ public boolean canRunConcurrent() { return false; } - private HapiSpec cryptoTransferPerf() { + final HapiSpec cryptoTransferPerf() { final int NUM_ACCOUNTS = 10; final int NUM_TRANSFERS = 10_000; final long INIT_BALANCE = 100_000_000_000L; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoTransferPerfSuiteWOpProvider.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoTransferPerfSuiteWOpProvider.java index 4c4880ffe869..dc65d0014a77 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoTransferPerfSuiteWOpProvider.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/CryptoTransferPerfSuiteWOpProvider.java @@ -61,7 +61,7 @@ public List getSpecsInSuite() { return List.of(runMixedTransferAndSubmits()); } - private HapiSpec runMixedTransferAndSubmits() { + final HapiSpec runMixedTransferAndSubmits() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); return defaultHapiSpec("CryptoTransferPerfSuiteWOpProvider") .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/NWayDistNoHotspots.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/NWayDistNoHotspots.java index 1aa9612db788..24fae10c1ff5 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/NWayDistNoHotspots.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/NWayDistNoHotspots.java @@ -77,7 +77,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec runDistributions() { + final HapiSpec runDistributions() { return customHapiSpec("runCreations") .withProperties(Map.of("default.keyAlgorithm", "ED25519")) .given(logIt("Creating at least " diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/SimpleXfersAvoidingHotspot.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/SimpleXfersAvoidingHotspot.java index 318c9facfd47..57ddd3210d08 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/SimpleXfersAvoidingHotspot.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/crypto/SimpleXfersAvoidingHotspot.java @@ -69,7 +69,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec runSimpleXfers() { + final HapiSpec runSimpleXfers() { return HapiSpec.customHapiSpec("RunTokenTransfers") .withProperties(Map.of( // "default.keyAlgorithm", "SECP256K1" diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/file/FileExpansionLoadProvider.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/file/FileExpansionLoadProvider.java index 2260861689e3..ddde37553f74 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/file/FileExpansionLoadProvider.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/file/FileExpansionLoadProvider.java @@ -96,7 +96,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec runFileExpansions() { + final HapiSpec runFileExpansions() { return HapiSpec.defaultHapiSpec("RunFileExpansions") .given( overriding(MAX_FILE_SIZE_KB_PROP, OVERRIDE_MAX_FILE_SIZE_KB), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/file/FileUpdateLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/file/FileUpdateLoadTest.java index 37cb1d29b13c..800d8e873fc5 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/file/FileUpdateLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/file/FileUpdateLoadTest.java @@ -56,7 +56,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec runFileUpdates() { + final HapiSpec runFileUpdates() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); final AtomicInteger submittedSoFar = new AtomicInteger(0); final byte[] NEW_CONTENTS = TxnUtils.randomUtf8Bytes(TxnUtils.BYTES_4K); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/mixedops/MixedTransferAndSubmitLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/mixedops/MixedTransferAndSubmitLoadTest.java index b7e0f2d53f40..d118bf71643b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/mixedops/MixedTransferAndSubmitLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/mixedops/MixedTransferAndSubmitLoadTest.java @@ -56,7 +56,7 @@ public List getSpecsInSuite() { return List.of(runMixedTransferAndSubmits()); } - private HapiSpec runMixedTransferAndSubmits() { + final HapiSpec runMixedTransferAndSubmits() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); final AtomicInteger submittedSoFar = new AtomicInteger(0); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/mixedops/MixedTransferCallAndSubmitLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/mixedops/MixedTransferCallAndSubmitLoadTest.java index c26215252afd..7af53c431bfc 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/mixedops/MixedTransferCallAndSubmitLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/mixedops/MixedTransferCallAndSubmitLoadTest.java @@ -60,7 +60,7 @@ public List getSpecsInSuite() { return List.of(runMixedTransferCallAndSubmits()); } - private HapiSpec runMixedTransferCallAndSubmits() { + final HapiSpec runMixedTransferCallAndSubmits() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); final AtomicInteger submittedSoFar = new AtomicInteger(0); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/schedule/OnePendingSigScheduledXfersLoad.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/schedule/OnePendingSigScheduledXfersLoad.java index 11e3a23ed3b9..519c7f0d2d3f 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/schedule/OnePendingSigScheduledXfersLoad.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/schedule/OnePendingSigScheduledXfersLoad.java @@ -80,7 +80,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec runOnePendingSigXfers() { + final HapiSpec runOnePendingSigXfers() { return defaultHapiSpec("RunOnePendingSigXfers") .given(stdMgmtOf(duration, unit, maxOpsPerSec)) .when(runWithProvider(pendingSigsFactory()) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/schedule/ReadyToRunScheduledXfersLoad.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/schedule/ReadyToRunScheduledXfersLoad.java index aff790b2a2bb..5bccbd689894 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/schedule/ReadyToRunScheduledXfersLoad.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/schedule/ReadyToRunScheduledXfersLoad.java @@ -71,7 +71,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec runReadyToRunXfers() { + final HapiSpec runReadyToRunXfers() { return defaultHapiSpec("RunReadyToRunXfers") .given(stdMgmtOf(duration, unit, maxOpsPerSec)) .when(runWithProvider(readyToRunXfersFactory()) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenAssociationLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenAssociationLoadTest.java index d2ef673d7c14..e787c6ee7708 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenAssociationLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenAssociationLoadTest.java @@ -42,7 +42,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec runTokenAssociationLoadTest() { + final HapiSpec runTokenAssociationLoadTest() { return HapiSpec.defaultHapiSpec("RunTokenAssociationLoadTest") .given(overridingTwo( "tokens.maxPerAccount", "10", diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenCreatePerfSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenCreatePerfSuite.java index cd2b33e0b4ee..6a60cc956a56 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenCreatePerfSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenCreatePerfSuite.java @@ -42,7 +42,7 @@ public List getSpecsInSuite() { return List.of(runTokenCreates()); } - private HapiSpec runTokenCreates() { + final HapiSpec runTokenCreates() { final int NUM_CREATES = 100000; return defaultHapiSpec("tokenCreatePerf") .given() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenRelStatusChanges.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenRelStatusChanges.java index 609add22179f..7bb0523bd319 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenRelStatusChanges.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenRelStatusChanges.java @@ -67,7 +67,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec runTokenRelStatusChanges() { + final HapiSpec runTokenRelStatusChanges() { return HapiSpec.defaultHapiSpec("RunTokenRelStatusChanges") .given(stdMgmtOf(duration, unit, maxOpsPerSec)) .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenTransferBasicLoadTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenTransferBasicLoadTest.java index 2f4166e75f77..d30c8f0f619b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenTransferBasicLoadTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenTransferBasicLoadTest.java @@ -189,7 +189,7 @@ public Optional get() { }; } - private HapiSpec runTokenTransferBasicLoadTest() { + final HapiSpec runTokenTransferBasicLoadTest() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); Supplier tokenTransferBurst = () -> new HapiSpecOperation[] {opSupplier(settings).get()}; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenTransfersLoadProvider.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenTransfersLoadProvider.java index 9ef2b3eee56f..71f829374119 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenTransfersLoadProvider.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/TokenTransfersLoadProvider.java @@ -78,7 +78,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec runTokenTransfers() { + final HapiSpec runTokenTransfers() { return HapiSpec.defaultHapiSpec("RunTokenTransfers") .given( getAccountBalance(DEFAULT_PAYER).logged(), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/UniqueTokenStateSetup.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/UniqueTokenStateSetup.java index d984e90e48c2..3b33eabfec32 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/UniqueTokenStateSetup.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/token/UniqueTokenStateSetup.java @@ -109,7 +109,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec createNfts() { + final HapiSpec createNfts() { return defaultHapiSpec("CreateNfts") .given( stdMgmtOf(duration, unit, maxOpsPerSec, "mint_"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/topic/CreateTopicPerfSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/topic/CreateTopicPerfSuite.java index b9392cb91c3a..f916733553fa 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/topic/CreateTopicPerfSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/topic/CreateTopicPerfSuite.java @@ -53,7 +53,7 @@ public boolean canRunConcurrent() { return false; } - private HapiSpec createTopicPerf() { + final HapiSpec createTopicPerf() { final int NUM_TOPICS = 100000; KeyShape submitKeyShape = threshOf(2, SIMPLE, SIMPLE, listOf(2)); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/topic/SubmitMessagePerfSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/topic/SubmitMessagePerfSuite.java index ab4a356a991c..7087137500b5 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/topic/SubmitMessagePerfSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/perf/topic/SubmitMessagePerfSuite.java @@ -51,7 +51,7 @@ public boolean canRunConcurrent() { return false; } - private HapiSpec submitMessagePerf() { + final HapiSpec submitMessagePerf() { final int NUM_SUBMISSIONS = 100_000; return defaultHapiSpec("submitMessagePerf") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoAccountCreationValidationsAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoAccountCreationValidationsAfterReconnect.java index 91ebdfbe63e3..a7d8592316d3 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoAccountCreationValidationsAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoAccountCreationValidationsAfterReconnect.java @@ -48,7 +48,7 @@ public static void main(String... args) { /* These validations are assuming the state is from a 6N-1C test in which a client generates 10 autoAccounts in the * beginning of the test */ @HapiTest - private HapiSpec getAccountInfoOfAutomaticallyCreatedAccounts() { + final HapiSpec getAccountInfoOfAutomaticallyCreatedAccounts() { return defaultHapiSpec("GetAccountInfoOfAutomaticallyCreatedAccounts") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoAccountCreationsBeforeReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoAccountCreationsBeforeReconnect.java index b99d981cdea7..17f0d5547e46 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoAccountCreationsBeforeReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoAccountCreationsBeforeReconnect.java @@ -50,7 +50,7 @@ public static void main(String... args) { new AutoAccountCreationsBeforeReconnect().runSuiteSync(); } - private HapiSpec createAccountsUsingAlias() { + final HapiSpec createAccountsUsingAlias() { return defaultHapiSpec("createAccountsUsingAlias").given().when().then(withOpContext((spec, opLog) -> { List ops = new ArrayList<>(); for (int i = 0; i < TOTAL_ACCOUNTS; i++) { diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoRenewEntitiesForReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoRenewEntitiesForReconnect.java index c76878bcc96c..330ab10b0331 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoRenewEntitiesForReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/AutoRenewEntitiesForReconnect.java @@ -54,7 +54,7 @@ public List getSpecsInSuite() { accountAutoRenewalSuiteCleanup()); } - private HapiSpec autoRenewAccountGetsDeletedOnReconnectingNodeAsWell() { + final HapiSpec autoRenewAccountGetsDeletedOnReconnectingNodeAsWell() { String autoDeleteAccount = "autoDeleteAccount"; int autoRenewSecs = 1; return defaultHapiSpec("AutoRenewAccountGetsDeletedOnReconnectingNodeAsWell") @@ -86,7 +86,7 @@ private HapiSpec autoRenewAccountGetsDeletedOnReconnectingNodeAsWell() { .hasAnswerOnlyPrecheckFrom(INVALID_ACCOUNT_ID)); } - private HapiSpec accountAutoRenewalSuiteCleanup() { + final HapiSpec accountAutoRenewalSuiteCleanup() { return defaultHapiSpec("accountAutoRenewalSuiteCleanup") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CheckUnavailableNode.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CheckUnavailableNode.java index 3c0bde82a816..6eff66c090a0 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CheckUnavailableNode.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CheckUnavailableNode.java @@ -37,7 +37,7 @@ public List getSpecsInSuite() { return List.of(checkUnavailableNode()); } - private HapiSpec checkUnavailableNode() { + final HapiSpec checkUnavailableNode() { return defaultHapiSpec("CheckUnavailableNode") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateAccountsBeforeReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateAccountsBeforeReconnect.java index 98b8f05db925..4fa6be0001e6 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateAccountsBeforeReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateAccountsBeforeReconnect.java @@ -68,7 +68,7 @@ private synchronized HapiSpecOperation generateCreateAccountOperation() { .deferStatusResolution(); } - private HapiSpec runCreateAccounts() { + final HapiSpec runCreateAccounts() { PerfTestLoadSettings settings = new PerfTestLoadSettings( ACCOUNT_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, DEFAULT_THREADS_FOR_RECONNECT_TESTS); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateFilesBeforeReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateFilesBeforeReconnect.java index 19be3d29f07e..91c3f6749fba 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateFilesBeforeReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateFilesBeforeReconnect.java @@ -67,7 +67,7 @@ private synchronized HapiSpecOperation generateFileCreateOperation() { .deferStatusResolution(); } - private HapiSpec runCreateFiles() { + final HapiSpec runCreateFiles() { PerfTestLoadSettings settings = new PerfTestLoadSettings( FILE_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, DEFAULT_THREADS_FOR_RECONNECT_TESTS); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateSchedulesBeforeReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateSchedulesBeforeReconnect.java index c46c028b32f7..8c1d44e20ca4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateSchedulesBeforeReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateSchedulesBeforeReconnect.java @@ -86,7 +86,7 @@ private HapiSpecOperation generateScheduleCreateOperation() { .advertisingCreation(); } - private HapiSpec runCreateSchedules() { + final HapiSpec runCreateSchedules() { PerfTestLoadSettings settings = new PerfTestLoadSettings( SCHEDULE_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, DEFAULT_THREADS_FOR_RECONNECT_TESTS); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateTokensBeforeReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateTokensBeforeReconnect.java index 1c42b0cb5ff5..bf37ece94392 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateTokensBeforeReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateTokensBeforeReconnect.java @@ -69,7 +69,7 @@ private HapiSpecOperation generateTopicCreateOperation() { .deferStatusResolution(); } - private HapiSpec runCreateTopics() { + final HapiSpec runCreateTopics() { PerfTestLoadSettings settings = new PerfTestLoadSettings( TOKEN_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateTopicsBeforeReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateTopicsBeforeReconnect.java index b1ce84f82b49..6e177ce41161 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateTopicsBeforeReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/CreateTopicsBeforeReconnect.java @@ -66,7 +66,7 @@ private synchronized HapiSpecOperation generateTopicCreateOperation() { .deferStatusResolution(); } - private HapiSpec runCreateTopics() { + final HapiSpec runCreateTopics() { PerfTestLoadSettings settings = new PerfTestLoadSettings( TOPIC_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, DEFAULT_THREADS_FOR_RECONNECT_TESTS); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/MixedValidationsAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/MixedValidationsAfterReconnect.java index 5c11e789bd6e..9837bc83fdf2 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/MixedValidationsAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/MixedValidationsAfterReconnect.java @@ -54,7 +54,7 @@ public List getSpecsInSuite() { return List.of(getAccountBalanceFromAllNodes(), validateTopicInfo(), validateFileInfo()); } - private HapiSpec getAccountBalanceFromAllNodes() { + final HapiSpec getAccountBalanceFromAllNodes() { // Since https://github.com/hashgraph/hedera-services/pull/5799, the nodes will create // 299 "blocklist" accounts with EVM addresses commonly used in HardHat test environments, // to protect developers from accidentally sending hbar to those addresses @@ -96,7 +96,7 @@ private HapiSpec getAccountBalanceFromAllNodes() { .hasTinyBars(changeFromSnapshot("lastlyCreatedAccountBalance", 0))); } - private HapiSpec validateTopicInfo() { + final HapiSpec validateTopicInfo() { final byte[] emptyRunningHash = new byte[48]; return defaultHapiSpec("ValidateTopicInfo") .given(getTopicInfo(TOPIC_ID_WITH_MESSAGE_SUBMITTED_TO).logged().saveRunningHash()) @@ -117,7 +117,7 @@ private HapiSpec validateTopicInfo() { .hasRunningHash(TOPIC_ID_WITH_MESSAGE_SUBMITTED_TO)); } - private HapiSpec validateFileInfo() { + final HapiSpec validateFileInfo() { return defaultHapiSpec("ValidateFileInfo") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/SchedulesExpiryDuringReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/SchedulesExpiryDuringReconnect.java index 66d77ec94d23..be820d15bd36 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/SchedulesExpiryDuringReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/SchedulesExpiryDuringReconnect.java @@ -65,7 +65,7 @@ public List getSpecsInSuite() { return List.of(runTransfersBeforeReconnect(), suiteSetup(), expireSchedulesDuringReconnect()); } - private HapiSpec expireSchedulesDuringReconnect() { + final HapiSpec expireSchedulesDuringReconnect() { String soonToBeExpiredSchedule = "schedule-1"; String longLastingSchedule = "schedule-2"; String oneOtherSchedule = "schedule-3"; @@ -169,7 +169,7 @@ private HapiSpec expireSchedulesDuringReconnect() { .hasCostAnswerPrecheck(INVALID_SCHEDULE_ID)); } - private HapiSpec suiteSetup() { + final HapiSpec suiteSetup() { return defaultHapiSpec("suiteSetup") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/SubmitMessagesForReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/SubmitMessagesForReconnect.java index adc38f3d9936..936699e18463 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/SubmitMessagesForReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/SubmitMessagesForReconnect.java @@ -56,7 +56,7 @@ private static HapiSpecOperation submitToTestTopic(PerfTestLoadSettings settings .deferStatusResolution(); } - private HapiSpec runSubmitMessages() { + final HapiSpec runSubmitMessages() { PerfTestLoadSettings settings = new PerfTestLoadSettings(); Supplier submitBurst = () -> new HapiSpecOperation[] {submitToTestTopic(settings)}; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/UpdateAllProtectedFilesDuringReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/UpdateAllProtectedFilesDuringReconnect.java index 9cf1d5896543..6509b83c6b60 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/UpdateAllProtectedFilesDuringReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/UpdateAllProtectedFilesDuringReconnect.java @@ -67,7 +67,7 @@ public List getSpecsInSuite() { return List.of(runTransfersBeforeReconnect(), updateAllProtectedFilesDuringReconnect()); } - private HapiSpec updateAllProtectedFilesDuringReconnect() { + final HapiSpec updateAllProtectedFilesDuringReconnect() { final String fileInfoRegistry = "apiPermissionsReconnect"; final String nonUpdatableFile = "nonUpdatableFile"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/UpdatePermissionsDuringReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/UpdatePermissionsDuringReconnect.java index da9a09d3469b..0db818b1c922 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/UpdatePermissionsDuringReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/UpdatePermissionsDuringReconnect.java @@ -46,7 +46,7 @@ public List getSpecsInSuite() { return List.of(updateApiPermissionsDuringReconnect()); } - private HapiSpec updateApiPermissionsDuringReconnect() { + final HapiSpec updateApiPermissionsDuringReconnect() { final String fileInfoRegistry = "apiPermissionsReconnect"; return defaultHapiSpec("updateApiPermissionsDuringReconnect") .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateAppPropertiesStateAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateAppPropertiesStateAfterReconnect.java index aa17b11fa851..ec0f37d455e7 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateAppPropertiesStateAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateAppPropertiesStateAfterReconnect.java @@ -49,7 +49,7 @@ public List getSpecsInSuite() { return List.of(validateAppPropertiesStateAfterReconnect()); } - private HapiSpec validateAppPropertiesStateAfterReconnect() { + final HapiSpec validateAppPropertiesStateAfterReconnect() { return customHapiSpec("validateAppPropertiesStateAfterReconnect") .withProperties(Map.of("txn.start.offset.secs", "-5")) .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateCongestionPricingAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateCongestionPricingAfterReconnect.java index 958780c736ea..0494030aab14 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateCongestionPricingAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateCongestionPricingAfterReconnect.java @@ -75,7 +75,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec validateCongestionPricing() { + final HapiSpec validateCongestionPricing() { var artificialLimits = protoDefsFromResource("testSystemFiles/artificial-limits-6N.json"); var defaultThrottles = protoDefsFromResource("testSystemFiles/throttles-dev.json"); String tmpMinCongestionPeriodInSecs = "5"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateDuplicateTransactionAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateDuplicateTransactionAfterReconnect.java index 093d70e2d893..436edaf02604 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateDuplicateTransactionAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateDuplicateTransactionAfterReconnect.java @@ -45,7 +45,7 @@ public List getSpecsInSuite() { return List.of(runTransfersBeforeReconnect(), validateDuplicateTransactionAfterReconnect()); } - private HapiSpec validateDuplicateTransactionAfterReconnect() { + final HapiSpec validateDuplicateTransactionAfterReconnect() { final String transactionId = "specialTransactionId"; return customHapiSpec("validateDuplicateTransactionAfterReconnect") .withProperties(Map.of("txn.start.offset.secs", "-5")) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateExchangeRateStateAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateExchangeRateStateAfterReconnect.java index 0172a624b80a..5a583dd7c8d2 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateExchangeRateStateAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateExchangeRateStateAfterReconnect.java @@ -47,7 +47,7 @@ public List getSpecsInSuite() { return List.of(validateExchangeRateStateAfterReconnect()); } - private HapiSpec validateExchangeRateStateAfterReconnect() { + final HapiSpec validateExchangeRateStateAfterReconnect() { final String transactionid = "authorizedTxn"; final long oldFee = 13_299_075L; final long newFee = 159_588_904; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateFeeScheduleStateAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateFeeScheduleStateAfterReconnect.java index 7e7cdd1884ba..7500ac92f9c4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateFeeScheduleStateAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateFeeScheduleStateAfterReconnect.java @@ -47,7 +47,7 @@ public List getSpecsInSuite() { return List.of(validateFeeScheduleStateAfterReconnect()); } - private HapiSpec validateFeeScheduleStateAfterReconnect() { + final HapiSpec validateFeeScheduleStateAfterReconnect() { return customHapiSpec("validateFeeScheduleStateAfterReconnect") .withProperties(Map.of("txn.start.offset.secs", "-5")) .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidatePermissionStateAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidatePermissionStateAfterReconnect.java index 74373a0d518f..a688af1993f9 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidatePermissionStateAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidatePermissionStateAfterReconnect.java @@ -46,7 +46,7 @@ public List getSpecsInSuite() { return List.of(validateApiPermissionStateAfterReconnect()); } - private HapiSpec validateApiPermissionStateAfterReconnect() { + final HapiSpec validateApiPermissionStateAfterReconnect() { return customHapiSpec("validateApiPermissionStateAfterReconnect") .withProperties(Map.of("txn.start.offset.secs", "-5")) .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateTokensDeleteAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateTokensDeleteAfterReconnect.java index 40b7590647dd..0d474ec0f82f 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateTokensDeleteAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateTokensDeleteAfterReconnect.java @@ -60,7 +60,7 @@ public List getSpecsInSuite() { return List.of(runTransfersBeforeReconnect(), validateTokensAfterReconnect()); } - private HapiSpec validateTokensAfterReconnect() { + final HapiSpec validateTokensAfterReconnect() { String token = "token"; String account = "account"; String adminKey = "admin"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateTokensStateAfterReconnect.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateTokensStateAfterReconnect.java index 9eafd355bf2f..029c9c5228b9 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateTokensStateAfterReconnect.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/reconnect/ValidateTokensStateAfterReconnect.java @@ -70,7 +70,7 @@ public List getSpecsInSuite() { return List.of(runTransfersBeforeReconnect(), validateTokensAfterReconnect()); } - private HapiSpec validateTokensAfterReconnect() { + final HapiSpec validateTokensAfterReconnect() { String tokenToBeQueried = "token-1"; String anotherToken = "token-2"; String anotherAccount = "account"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/BalanceValidation.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/BalanceValidation.java index bb84e859ec7b..a15a70bbdf34 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/BalanceValidation.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/BalanceValidation.java @@ -59,7 +59,7 @@ public List getSpecsInSuite() { return List.of(validateBalances()); } - private HapiSpec validateBalances() { + final HapiSpec validateBalances() { return customHapiSpec("ValidateBalances") .withProperties(Map.of( "fees.useFixedOffer", "true", diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/ClosingTime.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/ClosingTime.java index 6b4a57fca5ea..06ca80655b28 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/ClosingTime.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/ClosingTime.java @@ -48,7 +48,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec closeLastStreamFileWithNoBalanceImpact() { + final HapiSpec closeLastStreamFileWithNoBalanceImpact() { return customHapiSpec("CloseLastStreamFileWithNoBalanceImpact") .withProperties(Map.of( "fees.useFixedOffer", "true", diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/ContractRecordsSanityCheckSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/ContractRecordsSanityCheckSuite.java index 1f53374e3207..04b10b6b7561 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/ContractRecordsSanityCheckSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/ContractRecordsSanityCheckSuite.java @@ -71,7 +71,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec contractDeleteRecordSanityChecks() { + final HapiSpec contractDeleteRecordSanityChecks() { return defaultHapiSpec("ContractDeleteRecordSanityChecks") .given(flattened( uploadInitCode(BALANCE_LOOKUP), @@ -88,7 +88,7 @@ private HapiSpec contractDeleteRecordSanityChecks() { } @HapiTest - private HapiSpec contractCreateRecordSanityChecks() { + final HapiSpec contractCreateRecordSanityChecks() { return defaultHapiSpec("ContractCreateRecordSanityChecks") .given(flattened( uploadInitCode(BALANCE_LOOKUP), @@ -102,7 +102,7 @@ private HapiSpec contractCreateRecordSanityChecks() { } @HapiTest - private HapiSpec contractCallWithSendRecordSanityChecks() { + final HapiSpec contractCallWithSendRecordSanityChecks() { return defaultHapiSpec("ContractCallWithSendRecordSanityChecks") .given(flattened( uploadInitCode(PAYABLE_CONTRACT), @@ -120,7 +120,7 @@ private HapiSpec contractCallWithSendRecordSanityChecks() { } @HapiTest - private HapiSpec circularTransfersRecordSanityChecks() { + final HapiSpec circularTransfersRecordSanityChecks() { final var contractName = "CircularTransfers"; int numAltruists = 3; ToLongFunction initBalanceFn = ignore -> 1_000_000L; @@ -195,7 +195,7 @@ private HapiSpec circularTransfersRecordSanityChecks() { } @HapiTest - private HapiSpec contractUpdateRecordSanityChecks() { + final HapiSpec contractUpdateRecordSanityChecks() { return defaultHapiSpec("ContractUpdateRecordSanityChecks") .given(flattened( newKeyNamed("newKey").type(KeyFactory.KeyType.SIMPLE), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/CryptoRecordsSanityCheckSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/CryptoRecordsSanityCheckSuite.java index 23ee5c6b09a0..3e5d142a48b4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/CryptoRecordsSanityCheckSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/CryptoRecordsSanityCheckSuite.java @@ -75,7 +75,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec ownershipChangeShowsInRecord() { + final HapiSpec ownershipChangeShowsInRecord() { final var firstOwner = "A"; final var secondOwner = "B"; final var uniqueToken = "DoubleVision"; @@ -108,7 +108,7 @@ private HapiSpec ownershipChangeShowsInRecord() { } @HapiTest - private HapiSpec cryptoCreateRecordSanityChecks() { + final HapiSpec cryptoCreateRecordSanityChecks() { return defaultHapiSpec("CryptoCreateRecordSanityChecks") .given(takeBalanceSnapshots(FUNDING, NODE, STAKING_REWARD, NODE_REWARD, DEFAULT_PAYER)) .when(cryptoCreate("test").via("txn")) @@ -119,7 +119,7 @@ private HapiSpec cryptoCreateRecordSanityChecks() { } @HapiTest - private HapiSpec cryptoDeleteRecordSanityChecks() { + final HapiSpec cryptoDeleteRecordSanityChecks() { return defaultHapiSpec("CryptoDeleteRecordSanityChecks") .given(flattened( cryptoCreate("test"), @@ -134,7 +134,7 @@ private HapiSpec cryptoDeleteRecordSanityChecks() { } @HapiTest - private HapiSpec cryptoTransferRecordSanityChecks() { + final HapiSpec cryptoTransferRecordSanityChecks() { return defaultHapiSpec("CryptoTransferRecordSanityChecks") .given(flattened( cryptoCreate("a").balance(100_000L), @@ -147,7 +147,7 @@ private HapiSpec cryptoTransferRecordSanityChecks() { } @HapiTest - private HapiSpec cryptoUpdateRecordSanityChecks() { + final HapiSpec cryptoUpdateRecordSanityChecks() { return defaultHapiSpec("CryptoUpdateRecordSanityChecks") .given(flattened( cryptoCreate("test"), @@ -161,7 +161,7 @@ private HapiSpec cryptoUpdateRecordSanityChecks() { } @HapiTest - private HapiSpec insufficientAccountBalanceRecordSanityChecks() { + final HapiSpec insufficientAccountBalanceRecordSanityChecks() { final long BALANCE = 500_000_000L; return defaultHapiSpec("InsufficientAccountBalanceRecordSanityChecks") .given(flattened( @@ -185,7 +185,7 @@ private HapiSpec insufficientAccountBalanceRecordSanityChecks() { } @HapiTest - private HapiSpec invalidPayerSigCryptoTransferRecordSanityChecks() { + final HapiSpec invalidPayerSigCryptoTransferRecordSanityChecks() { final long BALANCE = 10_000_000L; return defaultHapiSpec("InvalidPayerSigCryptoTransferSanityChecks") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/DuplicateManagementTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/DuplicateManagementTest.java index 0ac8802664b4..cf4c207acbc0 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/DuplicateManagementTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/DuplicateManagementTest.java @@ -67,7 +67,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec hasExpectedDuplicates() { + final HapiSpec hasExpectedDuplicates() { return defaultHapiSpec("HasExpectedDuplicates") .given( cryptoCreate(CIVILIAN).balance(ONE_HUNDRED_HBARS), @@ -127,7 +127,7 @@ private HapiSpec hasExpectedDuplicates() { })); } - private HapiSpec usesUnclassifiableIfNoClassifiableAvailable() { + final HapiSpec usesUnclassifiableIfNoClassifiableAvailable() { return defaultHapiSpec("UsesUnclassifiableIfNoClassifiableAvailable") .given( newKeyNamed("wrongKey"), @@ -149,7 +149,7 @@ private HapiSpec usesUnclassifiableIfNoClassifiableAvailable() { .transfers(includingDeduction("node payment", TO)))); } - private HapiSpec classifiableTakesPriorityOverUnclassifiable() { + final HapiSpec classifiableTakesPriorityOverUnclassifiable() { return defaultHapiSpec("ClassifiableTakesPriorityOverUnclassifiable") .given( cryptoCreate(CIVILIAN).balance(100 * 100_000_000L), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/FileRecordsSanityCheckSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/FileRecordsSanityCheckSuite.java index 817e4b5f5996..4d2b99e3cccd 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/FileRecordsSanityCheckSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/FileRecordsSanityCheckSuite.java @@ -53,7 +53,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec fileAppendRecordSanityChecks() { + final HapiSpec fileAppendRecordSanityChecks() { return defaultHapiSpec("FileAppendRecordSanityChecks") .given(flattened( fileCreate("test"), @@ -66,7 +66,7 @@ private HapiSpec fileAppendRecordSanityChecks() { } @HapiTest - private HapiSpec fileCreateRecordSanityChecks() { + final HapiSpec fileCreateRecordSanityChecks() { return defaultHapiSpec("FileCreateRecordSanityChecks") .given(takeBalanceSnapshots(FUNDING, NODE, STAKING_REWARD, NODE_REWARD, DEFAULT_PAYER)) .when(fileCreate("test").via("txn")) @@ -77,7 +77,7 @@ private HapiSpec fileCreateRecordSanityChecks() { } @HapiTest - private HapiSpec fileDeleteRecordSanityChecks() { + final HapiSpec fileDeleteRecordSanityChecks() { return defaultHapiSpec("FileDeleteRecordSanityChecks") .given(flattened( fileCreate("test"), @@ -90,7 +90,7 @@ private HapiSpec fileDeleteRecordSanityChecks() { } @HapiTest - private HapiSpec fileUpdateRecordSanityChecks() { + final HapiSpec fileUpdateRecordSanityChecks() { return defaultHapiSpec("FileUpdateRecordSanityChecks") .given(flattened( fileCreate("test"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/RecordCreationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/RecordCreationSuite.java index b45413ec091c..3a2e1e985e4b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/RecordCreationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/RecordCreationSuite.java @@ -86,7 +86,7 @@ public List getSpecsInSuite() { submittingNodeStillPaidIfServiceFeesOmitted()); } - private HapiSpec submittingNodeStillPaidIfServiceFeesOmitted() { + final HapiSpec submittingNodeStillPaidIfServiceFeesOmitted() { final String comfortingMemo = THIS_IS_OK_IT_S_FINE_IT_S_WHATEVER; final AtomicReference feeObs = new AtomicReference<>(); @@ -139,7 +139,7 @@ private HapiSpec submittingNodeStillPaidIfServiceFeesOmitted() { .logged())); } - private HapiSpec submittingNodeChargedNetworkFeeForLackOfDueDiligence() { + final HapiSpec submittingNodeChargedNetworkFeeForLackOfDueDiligence() { final String comfortingMemo = THIS_IS_OK_IT_S_FINE_IT_S_WHATEVER; final String disquietingMemo = "\u0000his is ok, it's fine, it's whatever."; final AtomicReference feeObs = new AtomicReference<>(); @@ -190,7 +190,7 @@ private HapiSpec submittingNodeChargedNetworkFeeForLackOfDueDiligence() { .logged())); } - private HapiSpec submittingNodeChargedNetworkFeeForIgnoringPayerUnwillingness() { + final HapiSpec submittingNodeChargedNetworkFeeForIgnoringPayerUnwillingness() { final String comfortingMemo = THIS_IS_OK_IT_S_FINE_IT_S_WHATEVER; final AtomicReference feeObs = new AtomicReference<>(); @@ -242,7 +242,7 @@ private HapiSpec submittingNodeChargedNetworkFeeForIgnoringPayerUnwillingness() } @HapiTest - private HapiSpec payerRecordCreationSanityChecks() { + final HapiSpec payerRecordCreationSanityChecks() { return defaultHapiSpec("PayerRecordCreationSanityChecks") .given(cryptoCreate(PAYER)) .when( @@ -270,7 +270,7 @@ private long netChangeIn(TransactionRecord record, AccountID id) { } @HapiTest - private HapiSpec accountsGetPayerRecordsIfSoConfigured() { + final HapiSpec accountsGetPayerRecordsIfSoConfigured() { final var txn = "ofRecord"; return defaultHapiSpec("AccountsGetPayerRecordsIfSoConfigured") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/SignedTransactionBytesRecordsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/SignedTransactionBytesRecordsSuite.java index 9947f9e67557..a54cb056f681 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/SignedTransactionBytesRecordsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/SignedTransactionBytesRecordsSuite.java @@ -62,7 +62,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec transactionsWithOnlySigMap() { + final HapiSpec transactionsWithOnlySigMap() { final var contract = "BalanceLookup"; return defaultHapiSpec("TransactionsWithOnlySigMap") .given( @@ -87,7 +87,7 @@ private HapiSpec transactionsWithOnlySigMap() { } @HapiTest - private HapiSpec transactionsWithSignedTxnBytesAndSigMap() { + final HapiSpec transactionsWithSignedTxnBytesAndSigMap() { return defaultHapiSpec("TransactionsWithSignedTxnBytesAndSigMap") .given() .when(createTopic("testTopic") @@ -98,7 +98,7 @@ private HapiSpec transactionsWithSignedTxnBytesAndSigMap() { } @HapiTest - private HapiSpec transactionsWithSignedTxnBytesAndBodyBytes() { + final HapiSpec transactionsWithSignedTxnBytesAndBodyBytes() { return defaultHapiSpec("TransactionsWithSignedTxnBytesAndBodyBytes") .given() .when(cryptoCreate("testAccount") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/TokenBalanceValidation.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/TokenBalanceValidation.java index e0ca302af18e..4a9a1686dec0 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/TokenBalanceValidation.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/TokenBalanceValidation.java @@ -164,7 +164,7 @@ private HapiSpecOperation[] getHapiSpecsForTransferTxs() { * Create HAPI queries to check whether token balances match what's given in expectedTokenBalances * @return HAPI queries to execute */ - private HapiSpec validateTokenBalances() { + final HapiSpec validateTokenBalances() { return defaultHapiSpec("ValidateTokenBalances") .given(getHapiSpecsForTransferTxs()) // set up transfers if needed .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/TransactionBodyValidation.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/TransactionBodyValidation.java index 8d7d43a7514e..4f66be5d7df4 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/TransactionBodyValidation.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/records/TransactionBodyValidation.java @@ -40,7 +40,7 @@ public List getSpecsInSuite() { return List.of(validateTransactionBodySet()); } - private HapiSpec validateTransactionBodySet() { + final HapiSpec validateTransactionBodySet() { return defaultHapiSpec("TransactionBodyValidation") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/AddWellKnownEntities.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/AddWellKnownEntities.java index a5aaa6779329..11b993557dad 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/AddWellKnownEntities.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/AddWellKnownEntities.java @@ -43,7 +43,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec instantiateEntities() { + final HapiSpec instantiateEntities() { return HapiSpec.customHapiSpec("AddWellKnownEntities") .withProperties(Map.of( "fees.useFixedOffer", "true", diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/AddressAliasIdFuzzing.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/AddressAliasIdFuzzing.java index d45df4c01bba..c8f2290cdd01 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/AddressAliasIdFuzzing.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/AddressAliasIdFuzzing.java @@ -65,7 +65,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec addressAliasIdFuzzing() { + final HapiSpec addressAliasIdFuzzing() { final Map existingProps = new LinkedHashMap<>(); return propertyPreservingHapiSpec("AddressAliasIdFuzzing") .preserving( @@ -86,7 +86,7 @@ private HapiSpec addressAliasIdFuzzing() { } @HapiTest - private HapiSpec transferToKeyFuzzing() { + final HapiSpec transferToKeyFuzzing() { return defaultHapiSpec("TransferToKeyFuzzing") .given(cryptoCreate(UNIQUE_PAYER_ACCOUNT) .balance(UNIQUE_PAYER_ACCOUNT_INITIAL_BALANCE) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/HollowAccountCompletionFuzzing.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/HollowAccountCompletionFuzzing.java index 71b5a64eacc2..82614a90cb47 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/HollowAccountCompletionFuzzing.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/HollowAccountCompletionFuzzing.java @@ -49,7 +49,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec hollowAccountCompletionFuzzing() { + final HapiSpec hollowAccountCompletionFuzzing() { return defaultHapiSpec("HollowAccountCompletionFuzzing") .given(initOperations()) .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/JrsRestartTestTemplate.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/JrsRestartTestTemplate.java index 27e8e02d218f..c1dcfe5e6641 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/JrsRestartTestTemplate.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/JrsRestartTestTemplate.java @@ -99,7 +99,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec enableHSS() { + final HapiSpec enableHSS() { return defaultHapiSpec("enableHSS") .given( // Directly puting this request in the customHapiSpec before @@ -109,7 +109,7 @@ private HapiSpec enableHSS() { .then(); } - private HapiSpec jrsRestartTemplate() { + final HapiSpec jrsRestartTemplate() { return customHapiSpec("JrsRestartTemplate") .withProperties(Map.of("persistentEntities.dir.path", ENTITIES_DIR)) .given(expectedEntitiesExist()) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/MixedOpsRestartTest.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/MixedOpsRestartTest.java index c8f2e394210d..c5aa940f926b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/MixedOpsRestartTest.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/MixedOpsRestartTest.java @@ -89,7 +89,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec restartMixedOps() { + final HapiSpec restartMixedOps() { AtomicInteger tokenId = new AtomicInteger(0); AtomicInteger scheduleId = new AtomicInteger(0); Random r = new Random(38582L); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/PrecompileMintThrottlingCheck.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/PrecompileMintThrottlingCheck.java index 6da1593dfedd..81431b6f8c7b 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/PrecompileMintThrottlingCheck.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/PrecompileMintThrottlingCheck.java @@ -74,7 +74,7 @@ public List getSpecsInSuite() { } @SuppressWarnings("java:S5960") - private HapiSpec precompileNftMintsAreLimitedByConsThrottle() { + final HapiSpec precompileNftMintsAreLimitedByConsThrottle() { var mainnetLimits = protoDefsFromResource("testSystemFiles/mainnet-throttles.json"); return propertyPreservingHapiSpec("PrecompileNftMintsAreLimitedByConsThrottle") .preserving("contracts.throttle.throttleByGas") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/SplittingThrottlesWorks.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/SplittingThrottlesWorks.java index 4bf8025571ad..0b697d6af01c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/SplittingThrottlesWorks.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/SplittingThrottlesWorks.java @@ -64,7 +64,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec setNewLimits() { + final HapiSpec setNewLimits() { var artificialLimits = protoDefsFromResource("testSystemFiles/split-throttles.json"); return defaultHapiSpec("SetNewLimits") @@ -75,7 +75,7 @@ private HapiSpec setNewLimits() { .contents(artificialLimits.toByteArray())); } - private HapiSpec tryCreations() { + final HapiSpec tryCreations() { return defaultHapiSpec("TryCreations") .given() .when(runWithProvider(cryptoCreateOps()) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/SteadyStateThrottlingCheck.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/SteadyStateThrottlingCheck.java index 78347da9bc1f..4c8403be0380 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/SteadyStateThrottlingCheck.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/SteadyStateThrottlingCheck.java @@ -130,7 +130,7 @@ public List getSpecsInSuite() { @HapiTest @Order(1) - private HapiSpec setArtificialLimits() { + final HapiSpec setArtificialLimits() { var artificialLimits = protoDefsFromResource("testSystemFiles/artificial-limits.json"); return defaultHapiSpec("SetArtificialLimits") @@ -143,37 +143,37 @@ private HapiSpec setArtificialLimits() { @HapiTest @Order(2) - private HapiSpec checkXfersTps() { + final HapiSpec checkXfersTps() { return checkTps("Xfers", EXPECTED_XFER_TPS, xferOps()); } @HapiTest @Order(3) - private HapiSpec checkFungibleMintsTps() { + final HapiSpec checkFungibleMintsTps() { return checkTps("FungibleMints", EXPECTED_FUNGIBLE_MINT_TPS, fungibleMintOps()); } // @HapiTest - This test fails @Order(4) - private HapiSpec checkContractCallsTps() { + final HapiSpec checkContractCallsTps() { return checkTps("ContractCalls", EXPECTED_CONTRACT_CALL_TPS, scCallOps()); } // @HapiTest - This test fails @Order(5) - private HapiSpec checkCryptoCreatesTps() { + final HapiSpec checkCryptoCreatesTps() { return checkTps("CryptoCreates", EXPECTED_CRYPTO_CREATE_TPS, cryptoCreateOps()); } // @HapiTest - This test hangs @Order(6) - private HapiSpec checkBalanceQps() { + final HapiSpec checkBalanceQps() { return checkBalanceQps(1000, EXPECTED_GET_BALANCE_QPS); } @HapiTest @Order(7) - private HapiSpec restoreDevLimits() { + final HapiSpec restoreDevLimits() { var defaultThrottles = protoDefsFromResource("testSystemFiles/throttles-dev.json"); return defaultHapiSpec("RestoreDevLimits") .given() @@ -187,7 +187,7 @@ private HapiSpec restoreDevLimits() { .payingWith(ADDRESS_BOOK_CONTROL)); } - private HapiSpec checkTps(String txn, double expectedTps, Function provider) { + final HapiSpec checkTps(String txn, double expectedTps, Function provider) { return checkCustomNetworkTps(txn, expectedTps, provider, Collections.emptyMap()); } @@ -205,7 +205,7 @@ private HapiSpec checkTps(String txn, double expectedTps, Function */ @SuppressWarnings("java:S5960") - private HapiSpec checkCustomNetworkTps( + final HapiSpec checkCustomNetworkTps( String txn, double expectedTps, Function provider, Map custom) { final var name = "Throttles" + txn + "AsExpected"; final var baseSpec = @@ -229,7 +229,7 @@ private HapiSpec checkCustomNetworkTps( })); } - private HapiSpec checkBalanceQps(int burstSize, double expectedQps) { + final HapiSpec checkBalanceQps(int burstSize, double expectedQps) { return defaultHapiSpec("CheckBalanceQps") .given(cryptoCreate("curious").payingWith(GENESIS)) .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/TargetNetworkPrep.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/TargetNetworkPrep.java index 06e9a89e316c..a5728b1093b8 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/TargetNetworkPrep.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/TargetNetworkPrep.java @@ -75,7 +75,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec ensureSystemStateAsExpectedWithSystemDefaultFiles() { + final HapiSpec ensureSystemStateAsExpectedWithSystemDefaultFiles() { final var emptyKey = Key.newBuilder().setKeyList(KeyList.getDefaultInstance()).build(); final var snapshot800 = "800startBalance"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UmbrellaRedux.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UmbrellaRedux.java index 70f7a3a517f2..79d7df91d391 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UmbrellaRedux.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UmbrellaRedux.java @@ -71,7 +71,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec umbrellaRedux() { + final HapiSpec umbrellaRedux() { var defaultThrottles = protoDefsFromResource("testSystemFiles/throttles-dev.json"); return defaultHapiSpec("UmbrellaRedux") .given( diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UmbrellaReduxWithCustomNodes.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UmbrellaReduxWithCustomNodes.java index d0531e04b328..35fe42237954 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UmbrellaReduxWithCustomNodes.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UmbrellaReduxWithCustomNodes.java @@ -89,7 +89,7 @@ public List getSpecsInSuite() { return List.of(runUmbrellaReduxWithCustomNodes(), messageSubmissionSimple()); } - private HapiSpec messageSubmissionSimple() { + final HapiSpec messageSubmissionSimple() { return HapiSpec.customHapiSpec(MESSAGE_SUBMISSION_SIMPLE) .withProperties(Map.of( "default.topic.runningHash.version", topic_running_hash_version, @@ -110,7 +110,7 @@ private HapiSpec messageSubmissionSimple() { .checkTopicRunningHashVersion(topic_running_hash_version))); } - private HapiSpec runUmbrellaReduxWithCustomNodes() { + final HapiSpec runUmbrellaReduxWithCustomNodes() { return HapiSpec.customHapiSpec("RunUmbrellaReduxWithCustomNodes") .withProperties(Map.of( "status.wait.timeout.ms", diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UtilScalePricingCheck.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UtilScalePricingCheck.java index ae995ca8655e..fe9bfc879c52 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UtilScalePricingCheck.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/regression/UtilScalePricingCheck.java @@ -54,7 +54,7 @@ public List getSpecsInSuite() { } // Can only be run against an isolated network since it assumes the state begins with 0 NFTs minted - private HapiSpec nftPriceScalesWithUtilization() { + final HapiSpec nftPriceScalesWithUtilization() { final var civilian = "civilian"; final var maxAllowed = 100; final IntFunction mintOp = i -> "mint" + i; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java index ba75b823bf69..546cc9a3b049 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java @@ -137,7 +137,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec suiteCleanup() { + final HapiSpec suiteCleanup() { return defaultHapiSpec("suiteCleanup") .given() .when() @@ -145,7 +145,7 @@ private HapiSpec suiteCleanup() { } @HapiTest - private HapiSpec worksAsExpectedWithDefaultScheduleId() { + final HapiSpec worksAsExpectedWithDefaultScheduleId() { return defaultHapiSpec("WorksAsExpectedWithDefaultScheduleId") .given() .when() @@ -153,7 +153,7 @@ private HapiSpec worksAsExpectedWithDefaultScheduleId() { } @HapiTest - private HapiSpec bodyOnlyCreation() { + final HapiSpec bodyOnlyCreation() { return customHapiSpec("bodyOnlyCreation") .withProperties(Map.of("default.keyAlgorithm", "SECP256K1")) .given(overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), cryptoCreate(SENDER)) @@ -168,7 +168,7 @@ private HapiSpec bodyOnlyCreation() { } @HapiTest - private HapiSpec validateSignersInInfo() { + final HapiSpec validateSignersInInfo() { return customHapiSpec(VALID_SCHEDULE) .withProperties(Map.of("default.keyAlgorithm", "SECP256K1")) .given(cryptoCreate(SENDER)) @@ -183,7 +183,7 @@ private HapiSpec validateSignersInInfo() { } @HapiTest - private HapiSpec onlyBodyAndAdminCreation() { + final HapiSpec onlyBodyAndAdminCreation() { return defaultHapiSpec("OnlyBodyAndAdminCreation") .given(newKeyNamed(ADMIN), cryptoCreate(SENDER)) .when(scheduleCreate(ONLY_BODY_AND_ADMIN_KEY, cryptoTransfer(tinyBarsFromTo(SENDER, GENESIS, 1))) @@ -196,7 +196,7 @@ private HapiSpec onlyBodyAndAdminCreation() { } @HapiTest - private HapiSpec onlyBodyAndMemoCreation() { + final HapiSpec onlyBodyAndMemoCreation() { return defaultHapiSpec("OnlyBodyAndMemoCreation") .given(overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), cryptoCreate(SENDER)) .when(scheduleCreate(ONLY_BODY_AND_MEMO, cryptoTransfer(tinyBarsFromTo(SENDER, GENESIS, 1))) @@ -209,7 +209,7 @@ private HapiSpec onlyBodyAndMemoCreation() { } @HapiTest - private HapiSpec bodyAndPayerCreation() { + final HapiSpec bodyAndPayerCreation() { return defaultHapiSpec("BodyAndPayerCreation") .given(cryptoCreate(PAYER)) .when(scheduleCreate( @@ -227,7 +227,7 @@ private HapiSpec bodyAndPayerCreation() { } @HapiTest - private HapiSpec bodyAndSignatoriesCreation() { + final HapiSpec bodyAndSignatoriesCreation() { var scheduleName = "onlyBodyAndSignatories"; var scheduledTxn = cryptoTransfer(tinyBarsFromTo(SENDER, RECEIVER, 1)); @@ -250,7 +250,7 @@ private HapiSpec bodyAndSignatoriesCreation() { } @HapiTest - private HapiSpec failsWithNonExistingPayerAccountId() { + final HapiSpec failsWithNonExistingPayerAccountId() { return defaultHapiSpec("FailsWithNonExistingPayerAccountId") .given(overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate")) .when(scheduleCreate("invalidPayer", cryptoCreate("secondary")) @@ -260,7 +260,7 @@ private HapiSpec failsWithNonExistingPayerAccountId() { } @HapiTest - private HapiSpec failsWithTooLongMemo() { + final HapiSpec failsWithTooLongMemo() { return defaultHapiSpec("FailsWithTooLongMemo") .given() .when(scheduleCreate("invalidMemo", cryptoCreate("secondary")) @@ -270,7 +270,7 @@ private HapiSpec failsWithTooLongMemo() { } @HapiTest - private HapiSpec notIdenticalScheduleIfScheduledTxnChanges() { + final HapiSpec notIdenticalScheduleIfScheduledTxnChanges() { return defaultHapiSpec("NotIdenticalScheduleIfScheduledTxnChanges") .given( overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), @@ -292,7 +292,7 @@ private HapiSpec notIdenticalScheduleIfScheduledTxnChanges() { } @HapiTest - private HapiSpec notIdenticalScheduleIfMemoChanges() { + final HapiSpec notIdenticalScheduleIfMemoChanges() { return defaultHapiSpec("NotIdenticalScheduleIfMemoChanges") .given( overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), @@ -311,7 +311,7 @@ private HapiSpec notIdenticalScheduleIfMemoChanges() { } @HapiTest - private HapiSpec notIdenticalScheduleIfAdminKeyChanges() { + final HapiSpec notIdenticalScheduleIfAdminKeyChanges() { return defaultHapiSpec("notIdenticalScheduleIfAdminKeyChanges") .given( newKeyNamed("adminA"), @@ -338,7 +338,7 @@ private HapiSpec notIdenticalScheduleIfAdminKeyChanges() { } @HapiTest - private HapiSpec recognizesIdenticalScheduleEvenWithDifferentDesignatedPayer() { + final HapiSpec recognizesIdenticalScheduleEvenWithDifferentDesignatedPayer() { return defaultHapiSpec("recognizesIdenticalScheduleEvenWithDifferentDesignatedPayer") .given( overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), @@ -366,7 +366,7 @@ private HapiSpec recognizesIdenticalScheduleEvenWithDifferentDesignatedPayer() { } @HapiTest - private HapiSpec rejectsSentinelKeyListAsAdminKey() { + final HapiSpec rejectsSentinelKeyListAsAdminKey() { return defaultHapiSpec("RejectsSentinelKeyListAsAdminKey") .given() .when() @@ -376,7 +376,7 @@ private HapiSpec rejectsSentinelKeyListAsAdminKey() { } @HapiTest - private HapiSpec rejectsMalformedScheduledTxnMemo() { + final HapiSpec rejectsMalformedScheduledTxnMemo() { return defaultHapiSpec("RejectsMalformedScheduledTxnMemo") .given( cryptoCreate("ntb").memo(ZERO_BYTE_MEMO).hasPrecheck(INVALID_ZERO_BYTE_IN_STRING), @@ -396,7 +396,7 @@ private HapiSpec rejectsMalformedScheduledTxnMemo() { } @HapiTest - private HapiSpec infoIncludesTxnIdFromCreationReceipt() { + final HapiSpec infoIncludesTxnIdFromCreationReceipt() { return defaultHapiSpec("InfoIncludesTxnIdFromCreationReceipt") .given( overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), @@ -411,7 +411,7 @@ private HapiSpec infoIncludesTxnIdFromCreationReceipt() { } @HapiTest - private HapiSpec preservesRevocationServiceSemanticsForFileDelete() { + final HapiSpec preservesRevocationServiceSemanticsForFileDelete() { KeyShape waclShape = listOf(SIMPLE, threshOf(2, 3)); SigControl adequateSigs = waclShape.signedWith(sigs(OFF, sigs(ON, ON, OFF))); SigControl inadequateSigs = waclShape.signedWith(sigs(OFF, sigs(ON, OFF, OFF))); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java index 750c3ad7debf..866716d145e5 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java @@ -70,7 +70,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec deleteWithNoAdminKeyFails() { + final HapiSpec deleteWithNoAdminKeyFails() { return defaultHapiSpec("DeleteWithNoAdminKeyFails") .given( overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), @@ -82,7 +82,7 @@ private HapiSpec deleteWithNoAdminKeyFails() { } @HapiTest - private HapiSpec unauthorizedDeletionFails() { + final HapiSpec unauthorizedDeletionFails() { return defaultHapiSpec("UnauthorizedDeletionFails") .given( overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), @@ -99,7 +99,7 @@ private HapiSpec unauthorizedDeletionFails() { } @HapiTest - private HapiSpec deletingAlreadyDeletedIsObvious() { + final HapiSpec deletingAlreadyDeletedIsObvious() { return defaultHapiSpec("DeletingAlreadyDeletedIsObvious") .given( overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate"), @@ -117,7 +117,7 @@ private HapiSpec deletingAlreadyDeletedIsObvious() { } @HapiTest - private HapiSpec deletingNonExistingFails() { + final HapiSpec deletingNonExistingFails() { return defaultHapiSpec("DeletingNonExistingFails") .given() .when() @@ -126,7 +126,7 @@ private HapiSpec deletingNonExistingFails() { scheduleDelete("0.0.0").fee(ONE_HBAR).hasKnownStatus(INVALID_SCHEDULE_ID)); } - private HapiSpec deletingExecutedIsPointless() { + final HapiSpec deletingExecutedIsPointless() { return defaultHapiSpec("DeletingExecutedIsPointless") .given( overriding(SCHEDULING_WHITELIST, "CryptoTransfer,CryptoCreate,ConsensusSubmitMessage"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleExecutionSpecStateful.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleExecutionSpecStateful.java index 54aa65f75b96..ee7e1ae12413 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleExecutionSpecStateful.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleExecutionSpecStateful.java @@ -103,7 +103,7 @@ public List getSpecsInSuite() { suiteCleanup())); } - private HapiSpec scheduledBurnWithInvalidTokenThrowsUnresolvableSigners() { + final HapiSpec scheduledBurnWithInvalidTokenThrowsUnresolvableSigners() { return defaultHapiSpec("ScheduledBurnWithInvalidTokenThrowsUnresolvableSigners") .given(cryptoCreate(SCHEDULE_PAYER)) .when(scheduleCreate(VALID_SCHEDULE, burnToken("0.0.123231", List.of(1L, 2L))) @@ -112,7 +112,7 @@ private HapiSpec scheduledBurnWithInvalidTokenThrowsUnresolvableSigners() { .then(); } - private HapiSpec scheduledUniqueMintFailsWithNftsDisabled() { + final HapiSpec scheduledUniqueMintFailsWithNftsDisabled() { return defaultHapiSpec("ScheduledUniqueMintFailsWithNftsDisabled") .given( cryptoCreate(TREASURY), @@ -142,7 +142,7 @@ private HapiSpec scheduledUniqueMintFailsWithNftsDisabled() { .overridingProps(Map.of(TOKENS_NFTS_ARE_ENABLED, "true"))); } - private HapiSpec scheduledUniqueBurnFailsWithNftsDisabled() { + final HapiSpec scheduledUniqueBurnFailsWithNftsDisabled() { return defaultHapiSpec("ScheduledUniqueBurnFailsWithNftsDisabled") .given( cryptoCreate(TREASURY), @@ -218,7 +218,7 @@ public HapiSpec executionWithTransferListWrongSizedFails() { })); } - private HapiSpec executionWithTokenTransferListSizeExceedFails() { + final HapiSpec executionWithTokenTransferListSizeExceedFails() { String xToken = "XXX"; String invalidSchedule = "withMaxTokenTransfer"; String schedulePayer = "somebody", xTreasury = "xt", civilianA = "xa", civilianB = "xb"; @@ -253,7 +253,7 @@ private HapiSpec executionWithTokenTransferListSizeExceedFails() { getAccountBalance(xTreasury).hasTokenBalance(xToken, 100)); } - private HapiSpec suiteCleanup() { + final HapiSpec suiteCleanup() { return defaultHapiSpec("suiteCleanup") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleExecutionSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleExecutionSpecs.java index db213f911f65..eea4e7ebd250 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleExecutionSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleExecutionSpecs.java @@ -262,7 +262,7 @@ public List getSpecsInSuite() { suiteCleanup())); } - private HapiSpec suiteCleanup() { + final HapiSpec suiteCleanup() { return defaultHapiSpec("suiteCleanup") .given() .when() @@ -271,7 +271,7 @@ private HapiSpec suiteCleanup() { .overridingProps(Map.of(SCHEDULING_WHITELIST, defaultWhitelist))); } - private HapiSpec suiteSetup() { + final HapiSpec suiteSetup() { // Managing whitelist for these is error-prone, so just whitelist everything by default. final List whitelistNames = new LinkedList<>(); for (final HederaFunctionality enumValue : HederaFunctionality.values()) { @@ -288,7 +288,7 @@ private HapiSpec suiteSetup() { // This should not be run for modular service due to key gathering behavior differences. // c.f. Issue #9970 for explanation - private HapiSpec scheduledBurnFailsWithInvalidTxBody() { + final HapiSpec scheduledBurnFailsWithInvalidTxBody() { return defaultHapiSpec("ScheduledBurnFailsWithInvalidTxBody") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -313,7 +313,7 @@ private HapiSpec scheduledBurnFailsWithInvalidTxBody() { // This should not be run for modular service due to key gathering behavior differences. // c.f. Issue #9970 for explanation - private HapiSpec scheduledMintFailsWithInvalidTxBody() { + final HapiSpec scheduledMintFailsWithInvalidTxBody() { return defaultHapiSpec("ScheduledMintFailsWithInvalidTxBody") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -341,7 +341,7 @@ private HapiSpec scheduledMintFailsWithInvalidTxBody() { } @HapiTest - private HapiSpec scheduledMintWithInvalidTokenThrowsUnresolvableSigners() { + final HapiSpec scheduledMintWithInvalidTokenThrowsUnresolvableSigners() { return defaultHapiSpec("ScheduledMintWithInvalidTokenThrowsUnresolvableSigners") .given(overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), cryptoCreate(SCHEDULE_PAYER)) .when(scheduleCreate( @@ -354,7 +354,7 @@ private HapiSpec scheduledMintWithInvalidTokenThrowsUnresolvableSigners() { } @HapiTest - private HapiSpec scheduledUniqueBurnFailsWithInvalidBatchSize() { + final HapiSpec scheduledUniqueBurnFailsWithInvalidBatchSize() { return defaultHapiSpec("ScheduledUniqueBurnFailsWithInvalidBatchSize") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -387,7 +387,7 @@ private HapiSpec scheduledUniqueBurnFailsWithInvalidBatchSize() { } @HapiTest - private HapiSpec scheduledUniqueBurnExecutesProperly() { + final HapiSpec scheduledUniqueBurnExecutesProperly() { return defaultHapiSpec("ScheduledUniqueBurnExecutesProperly") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -463,7 +463,7 @@ private HapiSpec scheduledUniqueBurnExecutesProperly() { } @HapiTest - private HapiSpec scheduledUniqueMintFailsWithInvalidMetadata() { + final HapiSpec scheduledUniqueMintFailsWithInvalidMetadata() { return defaultHapiSpec("ScheduledUniqueMintFailsWithInvalidMetadata") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -491,7 +491,7 @@ private HapiSpec scheduledUniqueMintFailsWithInvalidMetadata() { } @HapiTest - private HapiSpec scheduledUniqueBurnFailsWithInvalidNftId() { + final HapiSpec scheduledUniqueBurnFailsWithInvalidNftId() { return defaultHapiSpec("ScheduledUniqueBurnFailsWithInvalidNftId") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -515,7 +515,7 @@ private HapiSpec scheduledUniqueBurnFailsWithInvalidNftId() { } @HapiTest - private HapiSpec scheduledBurnForUniqueSucceedsWithExistingAmount() { + final HapiSpec scheduledBurnForUniqueSucceedsWithExistingAmount() { return defaultHapiSpec("scheduledBurnForUniqueSucceedsWithExistingAmount") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -542,7 +542,7 @@ private HapiSpec scheduledBurnForUniqueSucceedsWithExistingAmount() { // This should not be run for modular service due to key gathering behavior differences. // c.f. Issue #9970 for explanation - private HapiSpec scheduledBurnForUniqueFailsWithInvalidAmount() { + final HapiSpec scheduledBurnForUniqueFailsWithInvalidAmount() { return defaultHapiSpec("ScheduledBurnForUniqueFailsWithInvalidAmount") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -578,7 +578,7 @@ private byte[] genRandomBytes(int numBytes) { } @HapiTest - private HapiSpec scheduledUniqueMintFailsWithInvalidBatchSize() { + final HapiSpec scheduledUniqueMintFailsWithInvalidBatchSize() { return defaultHapiSpec("ScheduledUniqueMintFailsWithInvalidBatchSize") .given( overriding(TOKENS_NFTS_MAX_BATCH_SIZE_MINT, "5"), @@ -617,7 +617,7 @@ private HapiSpec scheduledUniqueMintFailsWithInvalidBatchSize() { // This should not be run for modular service due to key gathering behavior differences. // c.f. Issue #9970 for explanation - private HapiSpec scheduledMintFailsWithInvalidAmount() { + final HapiSpec scheduledMintFailsWithInvalidAmount() { final var zeroAmountTxn = "zeroAmountTxn"; return defaultHapiSpec("ScheduledMintFailsWithInvalidAmount") .given( @@ -646,7 +646,7 @@ private HapiSpec scheduledMintFailsWithInvalidAmount() { } @HapiTest - private HapiSpec scheduledUniqueMintExecutesProperly() { + final HapiSpec scheduledUniqueMintExecutesProperly() { return defaultHapiSpec("ScheduledUniqueMintExecutesProperly") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -725,7 +725,7 @@ private HapiSpec scheduledUniqueMintExecutesProperly() { } @HapiTest - private HapiSpec scheduledMintExecutesProperly() { + final HapiSpec scheduledMintExecutesProperly() { return defaultHapiSpec("ScheduledMintExecutesProperly") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -797,7 +797,7 @@ private HapiSpec scheduledMintExecutesProperly() { } @HapiTest - private HapiSpec scheduledBurnExecutesProperly() { + final HapiSpec scheduledBurnExecutesProperly() { return defaultHapiSpec("ScheduledBurnExecutesProperly") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -870,7 +870,7 @@ private HapiSpec scheduledBurnExecutesProperly() { } @HapiTest - private HapiSpec scheduledXferFailingWithDeletedAccountPaysServiceFeeButNoImpact() { + final HapiSpec scheduledXferFailingWithDeletedAccountPaysServiceFeeButNoImpact() { final String xToken = "XXX"; final String validSchedule = "withLiveAccount"; final String invalidSchedule = "withDeletedAccount"; @@ -921,7 +921,7 @@ private HapiSpec scheduledXferFailingWithDeletedAccountPaysServiceFeeButNoImpact } @HapiTest - private HapiSpec scheduledXferFailingWithDeletedTokenPaysServiceFeeButNoImpact() { + final HapiSpec scheduledXferFailingWithDeletedTokenPaysServiceFeeButNoImpact() { String xToken = "XXX"; String validSchedule = "withLiveToken"; String invalidSchedule = "withDeletedToken"; @@ -975,7 +975,7 @@ private HapiSpec scheduledXferFailingWithDeletedTokenPaysServiceFeeButNoImpact() } @HapiTest - private HapiSpec scheduledXferFailingWithFrozenAccountTransferPaysServiceFeeButNoImpact() { + final HapiSpec scheduledXferFailingWithFrozenAccountTransferPaysServiceFeeButNoImpact() { String xToken = "XXX"; String validSchedule = "withUnfrozenAccount"; String invalidSchedule = "withFrozenAccount"; @@ -1031,7 +1031,7 @@ private HapiSpec scheduledXferFailingWithFrozenAccountTransferPaysServiceFeeButN } @HapiTest - private HapiSpec scheduledXferFailingWithNonKycedAccountTransferPaysServiceFeeButNoImpact() { + final HapiSpec scheduledXferFailingWithNonKycedAccountTransferPaysServiceFeeButNoImpact() { String xToken = "XXX"; String validSchedule = "withKycedToken"; String invalidSchedule = "withNonKycedToken"; @@ -1086,7 +1086,7 @@ private HapiSpec scheduledXferFailingWithNonKycedAccountTransferPaysServiceFeeBu } @HapiTest - private HapiSpec scheduledXferFailingWithUnassociatedAccountTransferPaysServiceFeeButNoImpact() { + final HapiSpec scheduledXferFailingWithUnassociatedAccountTransferPaysServiceFeeButNoImpact() { String xToken = "XXX"; String validSchedule = "withAssociatedToken"; String invalidSchedule = "withUnassociatedToken"; @@ -1137,7 +1137,7 @@ private HapiSpec scheduledXferFailingWithUnassociatedAccountTransferPaysServiceF // This should not be run for modular service due to key gathering behavior differences. // c.f. Issue #9970 for explanation - private HapiSpec scheduledXferFailingWithNonNetZeroTokenTransferPaysServiceFeeButNoImpact() { + final HapiSpec scheduledXferFailingWithNonNetZeroTokenTransferPaysServiceFeeButNoImpact() { String xToken = "XXX"; String validSchedule = "withZeroNetTokenChange"; String invalidSchedule = "withNonZeroNetTokenChange"; @@ -1187,7 +1187,7 @@ private HapiSpec scheduledXferFailingWithNonNetZeroTokenTransferPaysServiceFeeBu // This should not be run for modular service due to key gathering behavior differences. // c.f. Issue #9970 for explanation - private HapiSpec scheduledXferFailingWithRepeatedTokenIdPaysServiceFeeButNoImpact() { + final HapiSpec scheduledXferFailingWithRepeatedTokenIdPaysServiceFeeButNoImpact() { String xToken = "XXX"; String yToken = "YYY"; String validSchedule = "withNoRepeats"; @@ -1246,7 +1246,7 @@ private HapiSpec scheduledXferFailingWithRepeatedTokenIdPaysServiceFeeButNoImpac // This should not be run for modular service due to key gathering behavior differences. // c.f. Issue #9970 for explanation - private HapiSpec scheduledXferFailingWithEmptyTokenTransferAccountAmountsPaysServiceFeeButNoImpact() { + final HapiSpec scheduledXferFailingWithEmptyTokenTransferAccountAmountsPaysServiceFeeButNoImpact() { String xToken = "XXX"; String yToken = "YYY"; String validSchedule = "withNonEmptyTransfers"; @@ -1306,7 +1306,7 @@ private HapiSpec scheduledXferFailingWithEmptyTokenTransferAccountAmountsPaysSer } @HapiTest - private HapiSpec scheduledSubmitFailedWithMsgSizeTooLargeStillPaysServiceFeeButHasNoImpact() { + final HapiSpec scheduledSubmitFailedWithMsgSizeTooLargeStillPaysServiceFeeButHasNoImpact() { String immutableTopic = "XXX"; String validSchedule = "withValidSize"; String invalidSchedule = "withInvalidSize"; @@ -1348,7 +1348,7 @@ private HapiSpec scheduledSubmitFailedWithMsgSizeTooLargeStillPaysServiceFeeButH } @HapiTest - private HapiSpec scheduledSubmitFailedWithInvalidChunkTxnIdStillPaysServiceFeeButHasNoImpact() { + final HapiSpec scheduledSubmitFailedWithInvalidChunkTxnIdStillPaysServiceFeeButHasNoImpact() { String immutableTopic = "XXX"; String validSchedule = "withValidChunkTxnId"; String invalidSchedule = "withInvalidChunkTxnId"; @@ -1401,7 +1401,7 @@ private HapiSpec scheduledSubmitFailedWithInvalidChunkTxnIdStillPaysServiceFeeBu } @HapiTest - private HapiSpec scheduledSubmitFailedWithInvalidChunkNumberStillPaysServiceFeeButHasNoImpact() { + final HapiSpec scheduledSubmitFailedWithInvalidChunkNumberStillPaysServiceFeeButHasNoImpact() { String immutableTopic = "XXX"; String validSchedule = "withValidChunkNumber"; String invalidSchedule = "withInvalidChunkNumber"; @@ -1449,7 +1449,7 @@ private HapiSpec scheduledSubmitFailedWithInvalidChunkNumberStillPaysServiceFeeB } @HapiTest - private HapiSpec scheduledSubmitThatWouldFailWithInvalidTopicIdCannotBeScheduled() { + final HapiSpec scheduledSubmitThatWouldFailWithInvalidTopicIdCannotBeScheduled() { String civilianPayer = PAYER; AtomicReference> successFeesObs = new AtomicReference<>(); AtomicReference> failureFeesObs = new AtomicReference<>(); @@ -1488,7 +1488,7 @@ private void assertBasicallyIdentical( // @todo('9974') Need to work out why this succeeds instead // of failing with UNRESOLVABLE_REQUIRED_SIGNERS - private HapiSpec scheduledSubmitThatWouldFailWithTopicDeletedCannotBeSigned() { + final HapiSpec scheduledSubmitThatWouldFailWithTopicDeletedCannotBeSigned() { String adminKey = ADMIN; String mutableTopic = "XXX"; String postDeleteSchedule = "deferredTooLongSubmitMsg"; @@ -1514,7 +1514,7 @@ private HapiSpec scheduledSubmitThatWouldFailWithTopicDeletedCannotBeSigned() { } @HapiTest - private HapiSpec executionTriggersOnceTopicHasSatisfiedSubmitKey() { + final HapiSpec executionTriggersOnceTopicHasSatisfiedSubmitKey() { String adminKey = ADMIN; String submitKey = "submit"; String mutableTopic = "XXX"; @@ -1552,7 +1552,7 @@ private HapiSpec executionTriggersOnceTopicHasSatisfiedSubmitKey() { } @HapiTest - private HapiSpec executionTriggersWithWeirdlyRepeatedKey() { + final HapiSpec executionTriggersWithWeirdlyRepeatedKey() { String schedule = "dupKeyXfer"; return defaultHapiSpec("ExecutionTriggersWithWeirdlyRepeatedKey") @@ -1586,7 +1586,7 @@ private HapiSpec executionTriggersWithWeirdlyRepeatedKey() { } // @todo('9976') Need to work out why this does not produce the expected transfer list - private HapiSpec executionWithDefaultPayerWorks() { + final HapiSpec executionWithDefaultPayerWorks() { long transferAmount = 1; return defaultHapiSpec("ExecutionWithDefaultPayerWorks") .given( @@ -1644,7 +1644,7 @@ private HapiSpec executionWithDefaultPayerWorks() { } // @todo('9977') Need to figure out why the ending balance does not match expected - private HapiSpec executionWithDefaultPayerButNoFundsFails() { + final HapiSpec executionWithDefaultPayerButNoFundsFails() { long balance = 10_000_000L; long noBalance = 0L; long transferAmount = 1L; @@ -1682,7 +1682,7 @@ private HapiSpec executionWithDefaultPayerButNoFundsFails() { } @HapiTest - private HapiSpec executionWithCustomPayerWorksWithLastSigBeingCustomPayer() { + final HapiSpec executionWithCustomPayerWorksWithLastSigBeingCustomPayer() { long noBalance = 0L; long transferAmount = 1; return defaultHapiSpec("ExecutionWithCustomPayerWorksWithLastSigBeingCustomPayer") @@ -1720,7 +1720,7 @@ private HapiSpec executionWithCustomPayerWorksWithLastSigBeingCustomPayer() { } // @todo('9977') Need to figure out why the ending balance does not match expected - private HapiSpec executionWithCustomPayerButNoFundsFails() { + final HapiSpec executionWithCustomPayerButNoFundsFails() { long balance = 0L; long noBalance = 0L; long transferAmount = 1; @@ -1753,7 +1753,7 @@ private HapiSpec executionWithCustomPayerButNoFundsFails() { } // @todo('9977') Need to figure out why the ending balance does not match expected - private HapiSpec executionWithDefaultPayerButAccountDeletedFails() { + final HapiSpec executionWithDefaultPayerButAccountDeletedFails() { long balance = 10_000_000L; long noBalance = 0L; long transferAmount = 1L; @@ -1779,7 +1779,7 @@ private HapiSpec executionWithDefaultPayerButAccountDeletedFails() { } // @todo('9977') Need to figure out why the ending balance does not match expected - private HapiSpec executionWithCustomPayerButAccountDeletedFails() { + final HapiSpec executionWithCustomPayerButAccountDeletedFails() { long balance = 10_000_000L; long noBalance = 0L; long transferAmount = 1; @@ -1816,7 +1816,7 @@ private HapiSpec executionWithCustomPayerButAccountDeletedFails() { } @HapiTest - private HapiSpec executionWithCryptoInsufficientAccountBalanceFails() { + final HapiSpec executionWithCryptoInsufficientAccountBalanceFails() { long noBalance = 0L; long senderBalance = 100L; long transferAmount = 101L; @@ -1850,7 +1850,7 @@ private HapiSpec executionWithCryptoInsufficientAccountBalanceFails() { } @HapiTest - private HapiSpec executionWithCryptoSenderDeletedFails() { + final HapiSpec executionWithCryptoSenderDeletedFails() { long noBalance = 0L; long senderBalance = 100L; long transferAmount = 101L; @@ -1886,7 +1886,7 @@ private HapiSpec executionWithCryptoSenderDeletedFails() { } @HapiTest - private HapiSpec executionWithTokenInsufficientAccountBalanceFails() { + final HapiSpec executionWithTokenInsufficientAccountBalanceFails() { String xToken = "XXX"; String invalidSchedule = "withInsufficientTokenTransfer"; String schedulePayer = PAYER; @@ -1921,7 +1921,7 @@ private HapiSpec executionWithTokenInsufficientAccountBalanceFails() { // This should not be run for modular service due to key gathering behavior differences. // c.f. Issue #9970 for explanation - private HapiSpec executionWithInvalidAccountAmountsFails() { + final HapiSpec executionWithInvalidAccountAmountsFails() { long transferAmount = 100; long senderBalance = 1000L; long payingAccountBalance = 1_000_000L; @@ -1958,7 +1958,7 @@ private HapiSpec executionWithInvalidAccountAmountsFails() { } // @todo('9976') Need to work out why this does not produce the expected transfer list - private HapiSpec executionWithCustomPayerWorks() { + final HapiSpec executionWithCustomPayerWorks() { long transferAmount = 1; return defaultHapiSpec("ExecutionWithCustomPayerWorks") .given( @@ -2024,7 +2024,7 @@ private HapiSpec executionWithCustomPayerWorks() { } // @todo('9976') Need to work out why this does not produce the expected transfer list - private HapiSpec executionWithCustomPayerAndAdminKeyWorks() { + final HapiSpec executionWithCustomPayerAndAdminKeyWorks() { long transferAmount = 1; return defaultHapiSpec("ExecutionWithCustomPayerAndAdminKeyWorks") .given( @@ -2092,7 +2092,7 @@ private HapiSpec executionWithCustomPayerAndAdminKeyWorks() { } // @todo('9976') Need to work out why this does not produce the expected transfer list - private HapiSpec executionWithCustomPayerWhoSignsAtCreationAsPayerWorks() { + final HapiSpec executionWithCustomPayerWhoSignsAtCreationAsPayerWorks() { long transferAmount = 1; return defaultHapiSpec("ExecutionWithCustomPayerWhoSignsAtCreationAsPayerWorks") .given( @@ -2185,7 +2185,7 @@ public static boolean transferListCheck( } // Currently this cannot be run as HapiTest because it stops the captive nodes. - private HapiSpec scheduledFreezeWorksAsExpected() { + final HapiSpec scheduledFreezeWorksAsExpected() { final byte[] poeticUpgradeHash = ScheduleUtils.getPoeticUpgradeHash(); return defaultHapiSpec("ScheduledFreezeWorksAsExpected") @@ -2227,7 +2227,7 @@ private HapiSpec scheduledFreezeWorksAsExpected() { } // Currently this cannot be run as HapiTest because it stops the captive nodes. - private HapiSpec scheduledFreezeWithUnauthorizedPayerFails(boolean isLongTermEnabled) { + final HapiSpec scheduledFreezeWithUnauthorizedPayerFails(boolean isLongTermEnabled) { final byte[] poeticUpgradeHash = ScheduleUtils.getPoeticUpgradeHash(); if (isLongTermEnabled) { @@ -2298,7 +2298,7 @@ private HapiSpec scheduledFreezeWithUnauthorizedPayerFails(boolean isLongTermEna } // @todo('9973') Need to work out why this does not actually execute - private HapiSpec scheduledPermissionedFileUpdateWorksAsExpected() { + final HapiSpec scheduledPermissionedFileUpdateWorksAsExpected() { return defaultHapiSpec("ScheduledPermissionedFileUpdateWorksAsExpected") .given( overriding(SCHEDULING_WHITELIST, WHITELIST_MINIMUM), @@ -2330,7 +2330,7 @@ private HapiSpec scheduledPermissionedFileUpdateWorksAsExpected() { } // @todo('9973') Work out permissioned file update issues - private HapiSpec scheduledPermissionedFileUpdateUnauthorizedPayerFails() { + final HapiSpec scheduledPermissionedFileUpdateUnauthorizedPayerFails() { return defaultHapiSpec("ScheduledPermissionedFileUpdateUnauthorizedPayerFails") .given( @@ -2364,7 +2364,7 @@ private HapiSpec scheduledPermissionedFileUpdateUnauthorizedPayerFails() { } // @todo('9973') Work out permissioned file update issues - private HapiSpec scheduledSystemDeleteWorksAsExpected() { + final HapiSpec scheduledSystemDeleteWorksAsExpected() { return defaultHapiSpec("ScheduledSystemDeleteWorksAsExpected") .given( @@ -2397,7 +2397,7 @@ private HapiSpec scheduledSystemDeleteWorksAsExpected() { } @HapiTest - private HapiSpec scheduledSystemDeleteUnauthorizedPayerFails(boolean isLongTermEnabled) { + final HapiSpec scheduledSystemDeleteUnauthorizedPayerFails(boolean isLongTermEnabled) { if (isLongTermEnabled) { @@ -2456,7 +2456,7 @@ private HapiSpec scheduledSystemDeleteUnauthorizedPayerFails(boolean isLongTermE // @todo('') Work out why we get `PLATFORM_TRANSACTION_NOT_CREATED` instead of `OK` for UncheckedSubmit... // This appears to come from `blockingOrder` call in `when` clause - private HapiSpec congestionPricingAffectsImmediateScheduleExecution() { + final HapiSpec congestionPricingAffectsImmediateScheduleExecution() { var artificialLimits = protoDefsFromResource("testSystemFiles/artificial-limits-congestion.json"); var defaultThrottles = protoDefsFromResource("testSystemFiles/throttles-dev.json"); var contract = "Multipurpose"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleLongTermExecutionSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleLongTermExecutionSpecs.java index 5899f32c87d0..a16e2e10de9c 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleLongTermExecutionSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleLongTermExecutionSpecs.java @@ -167,7 +167,7 @@ public List getSpecsInSuite() { } @SuppressWarnings("java:S5960") - private HapiSpec executionWithCustomPayerWorks() { + final HapiSpec executionWithCustomPayerWorks() { return defaultHapiSpec("ExecutionAtExpiryWithCustomPayerWorks") .given( cryptoCreate(PAYING_ACCOUNT), @@ -272,7 +272,7 @@ private HapiSpec executionWithCustomPayerWorks() { })); } - private HapiSpec executionWithCustomPayerAndAdminKeyWorks() { + final HapiSpec executionWithCustomPayerAndAdminKeyWorks() { return defaultHapiSpec("ExecutionAtExpiryWithCustomPayerAndAdminKeyWorks") .given( newKeyNamed("adminKey"), @@ -379,7 +379,7 @@ private HapiSpec executionWithCustomPayerAndAdminKeyWorks() { })); } - private HapiSpec executionWithCustomPayerWhoSignsAtCreationAsPayerWorks() { + final HapiSpec executionWithCustomPayerWhoSignsAtCreationAsPayerWorks() { return defaultHapiSpec("ExecutionAtExpiryWithCustomPayerWhoSignsAtCreationAsPayerWorks") .given( cryptoCreate(PAYING_ACCOUNT), @@ -1081,7 +1081,7 @@ public HapiSpec executionTriggersWithWeirdlyRepeatedKey() { .hasPrecheck(INVALID_SCHEDULE_ID)); } - private HapiSpec scheduledFreezeWorksAsExpected() { + final HapiSpec scheduledFreezeWorksAsExpected() { final byte[] poeticUpgradeHash = getPoeticUpgradeHash(); @@ -1135,7 +1135,7 @@ private HapiSpec scheduledFreezeWorksAsExpected() { })); } - private HapiSpec scheduledFreezeWithUnauthorizedPayerFails() { + final HapiSpec scheduledFreezeWithUnauthorizedPayerFails() { final byte[] poeticUpgradeHash = getPoeticUpgradeHash(); @@ -1170,7 +1170,7 @@ private HapiSpec scheduledFreezeWithUnauthorizedPayerFails() { HapiSpecSetup.getDefaultNodeProps().get(SCHEDULING_WHITELIST))); } - private HapiSpec scheduledPermissionedFileUpdateWorksAsExpected() { + final HapiSpec scheduledPermissionedFileUpdateWorksAsExpected() { return defaultHapiSpec("ScheduledPermissionedFileUpdateWorksAsExpectedAtExpiry") .given( @@ -1215,7 +1215,7 @@ private HapiSpec scheduledPermissionedFileUpdateWorksAsExpected() { })); } - private HapiSpec scheduledPermissionedFileUpdateUnauthorizedPayerFails() { + final HapiSpec scheduledPermissionedFileUpdateUnauthorizedPayerFails() { return defaultHapiSpec("ScheduledPermissionedFileUpdateUnauthorizedPayerFailsAtExpiry") .given( @@ -1261,7 +1261,7 @@ private HapiSpec scheduledPermissionedFileUpdateUnauthorizedPayerFails() { })); } - private HapiSpec scheduledSystemDeleteWorksAsExpected() { + final HapiSpec scheduledSystemDeleteWorksAsExpected() { return defaultHapiSpec("ScheduledSystemDeleteWorksAsExpectedAtExpiry") .given( @@ -1306,7 +1306,7 @@ private HapiSpec scheduledSystemDeleteWorksAsExpected() { })); } - private HapiSpec scheduledSystemDeleteUnauthorizedPayerFails() { + final HapiSpec scheduledSystemDeleteUnauthorizedPayerFails() { return defaultHapiSpec("ScheduledSystemDeleteUnauthorizedPayerFailsAtExpiry") .given( @@ -1442,7 +1442,7 @@ public HapiSpec expiryIgnoredWhenLongTermDisabledThenEnabled() { getAccountBalance(RECEIVER).hasTinyBars(0L)); } - private HapiSpec futureThrottlesAreRespected() { + final HapiSpec futureThrottlesAreRespected() { var artificialLimits = protoDefsFromResource("testSystemFiles/artificial-limits-schedule.json"); var defaultThrottles = protoDefsFromResource("testSystemFiles/throttles-dev.json"); diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleLongTermSignSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleLongTermSignSpecs.java index 48c882166d6e..62b31aeb5f67 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleLongTermSignSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleLongTermSignSpecs.java @@ -115,7 +115,7 @@ public List getSpecsInSuite() { ScheduleLongTermExecutionSpecs.setLongTermScheduledTransactionsToDefault()); } - private HapiSpec suiteCleanup() { + final HapiSpec suiteCleanup() { return defaultHapiSpec("suiteCleanup") .given() .when() @@ -124,7 +124,7 @@ private HapiSpec suiteCleanup() { .overridingProps(Map.of(SCHEDULING_WHITELIST, defaultWhitelist))); } - private HapiSpec suiteSetup() { + final HapiSpec suiteSetup() { return defaultHapiSpec("suiteSetup") .given() .when() @@ -133,7 +133,7 @@ private HapiSpec suiteSetup() { .overridingProps(Map.of(SCHEDULING_WHITELIST, suiteWhitelist))); } - private HapiSpec changeInNestedSigningReqsRespected() { + final HapiSpec changeInNestedSigningReqsRespected() { var senderShape = threshOf(2, threshOf(1, 3), threshOf(1, 3), threshOf(1, 3)); var sigOne = senderShape.signedWith(sigs(sigs(OFF, OFF, ON), sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF))); var firstSigThree = senderShape.signedWith(sigs(sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF), sigs(ON, OFF, OFF))); @@ -192,7 +192,7 @@ private Key bumpThirdNestedThresholdSigningReq(Key source) { return mutation; } - private HapiSpec reductionInSigningReqsAllowsTxnToGoThrough() { + final HapiSpec reductionInSigningReqsAllowsTxnToGoThrough() { var senderShape = threshOf(2, threshOf(1, 3), threshOf(1, 3), threshOf(2, 3)); var sigOne = senderShape.signedWith(sigs(sigs(OFF, OFF, ON), sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF))); var sigTwo = senderShape.signedWith(sigs(sigs(OFF, OFF, OFF), sigs(ON, ON, ON), sigs(OFF, OFF, OFF))); @@ -242,7 +242,7 @@ private HapiSpec reductionInSigningReqsAllowsTxnToGoThrough() { getAccountBalance(receiver).hasTinyBars(1L)); } - private HapiSpec reductionInSigningReqsAllowsTxnToGoThroughAtExpiryWithNoWaitForExpiry() { + final HapiSpec reductionInSigningReqsAllowsTxnToGoThroughAtExpiryWithNoWaitForExpiry() { var senderShape = threshOf(2, threshOf(1, 3), threshOf(1, 3), threshOf(2, 3)); var sigOne = senderShape.signedWith(sigs(sigs(OFF, OFF, ON), sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF))); var sigTwo = senderShape.signedWith(sigs(sigs(OFF, OFF, OFF), sigs(ON, ON, ON), sigs(OFF, OFF, OFF))); @@ -300,7 +300,7 @@ private Key lowerThirdNestedThresholdSigningReq(Key source) { return mutation; } - private HapiSpec nestedSigningReqsWorkAsExpected() { + final HapiSpec nestedSigningReqsWorkAsExpected() { var senderShape = threshOf(2, threshOf(1, 3), threshOf(1, 3), threshOf(1, 3)); var sigOne = senderShape.signedWith(sigs(sigs(OFF, OFF, ON), sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF))); var sigTwo = senderShape.signedWith(sigs(sigs(OFF, OFF, OFF), sigs(OFF, ON, OFF), sigs(OFF, OFF, OFF))); @@ -339,7 +339,7 @@ private HapiSpec nestedSigningReqsWorkAsExpected() { getAccountBalance(receiver).hasTinyBars(1L)); } - private HapiSpec receiverSigRequiredNotConfusedByOrder() { + final HapiSpec receiverSigRequiredNotConfusedByOrder() { var senderShape = threshOf(1, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); String sender = "X"; @@ -376,7 +376,7 @@ private HapiSpec receiverSigRequiredNotConfusedByOrder() { getAccountBalance(receiver).hasTinyBars(1L)); } - private HapiSpec extraSigsDontMatterAtExpiry() { + final HapiSpec extraSigsDontMatterAtExpiry() { var senderShape = threshOf(1, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); var sigTwo = senderShape.signedWith(sigs(OFF, ON, OFF)); @@ -469,7 +469,7 @@ private HapiSpec extraSigsDontMatterAtExpiry() { getAccountBalance(receiver).hasTinyBars(1L)); } - private HapiSpec receiverSigRequiredNotConfusedByMultiSigSender() { + final HapiSpec receiverSigRequiredNotConfusedByMultiSigSender() { var senderShape = threshOf(1, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); var sigTwo = senderShape.signedWith(sigs(OFF, ON, OFF)); @@ -510,7 +510,7 @@ private HapiSpec receiverSigRequiredNotConfusedByMultiSigSender() { getAccountBalance(receiver).hasTinyBars(1L)); } - private HapiSpec receiverSigRequiredUpdateIsRecognized() { + final HapiSpec receiverSigRequiredUpdateIsRecognized() { var senderShape = threshOf(2, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); var sigTwo = senderShape.signedWith(sigs(OFF, ON, OFF)); @@ -556,7 +556,7 @@ private HapiSpec receiverSigRequiredUpdateIsRecognized() { getAccountBalance(receiver).hasTinyBars(1)); } - private HapiSpec basicSignatureCollectionWorks() { + final HapiSpec basicSignatureCollectionWorks() { var txnBody = cryptoTransfer(tinyBarsFromTo(SENDER, RECEIVER, 1)); return defaultHapiSpec("BasicSignatureCollectionWorksWithExpiryAndWait") @@ -568,7 +568,7 @@ private HapiSpec basicSignatureCollectionWorks() { .then(getScheduleInfo(BASIC_XFER).hasSignatories(RECEIVER)); } - private HapiSpec signalsIrrelevantSig() { + final HapiSpec signalsIrrelevantSig() { var txnBody = cryptoTransfer(tinyBarsFromTo(SENDER, RECEIVER, 1)); return defaultHapiSpec("SignalsIrrelevantSigWithExpiryAndWait") @@ -583,7 +583,7 @@ private HapiSpec signalsIrrelevantSig() { .hasKnownStatusFrom(NO_NEW_VALID_SIGNATURES, SOME_SIGNATURES_WERE_INVALID)); } - private HapiSpec signalsIrrelevantSigEvenAfterLinkedEntityUpdate() { + final HapiSpec signalsIrrelevantSigEvenAfterLinkedEntityUpdate() { var txnBody = mintToken(TOKEN_A, 50000000L); return defaultHapiSpec("SignalsIrrelevantSigEvenAfterLinkedEntityUpdateWithExpiryAndWait") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleSignSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleSignSpecs.java index 26ba92d8628e..104bb82279fa 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleSignSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleSignSpecs.java @@ -146,7 +146,7 @@ private HapiSpec suiteSetup() { } @HapiTest - private HapiSpec signingDeletedSchedulesHasNoEffect() { + final HapiSpec signingDeletedSchedulesHasNoEffect() { String sender = "X"; String receiver = "Y"; String schedule = "Z"; @@ -169,7 +169,7 @@ private HapiSpec signingDeletedSchedulesHasNoEffect() { } @HapiTest - private HapiSpec changeInNestedSigningReqsRespected() { + final HapiSpec changeInNestedSigningReqsRespected() { var senderShape = threshOf(2, threshOf(1, 3), threshOf(1, 3), threshOf(1, 3)); var sigOne = senderShape.signedWith(sigs(sigs(OFF, OFF, ON), sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF))); var sigTwo = senderShape.signedWith(sigs(sigs(OFF, OFF, OFF), sigs(ON, ON, ON), sigs(OFF, OFF, OFF))); @@ -221,7 +221,7 @@ private Key bumpThirdNestedThresholdSigningReq(Key source) { } @HapiTest - private HapiSpec reductionInSigningReqsAllowsTxnToGoThrough() { + final HapiSpec reductionInSigningReqsAllowsTxnToGoThrough() { var senderShape = threshOf(2, threshOf(1, 3), threshOf(1, 3), threshOf(2, 3)); var sigOne = senderShape.signedWith(sigs(sigs(OFF, OFF, ON), sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF))); var sigTwo = senderShape.signedWith(sigs(sigs(OFF, OFF, OFF), sigs(ON, ON, ON), sigs(OFF, OFF, OFF))); @@ -259,7 +259,7 @@ private HapiSpec reductionInSigningReqsAllowsTxnToGoThrough() { getAccountBalance(receiver).hasTinyBars(1L)); } - private HapiSpec reductionInSigningReqsAllowsTxnToGoThroughWithRandomKey() { + final HapiSpec reductionInSigningReqsAllowsTxnToGoThroughWithRandomKey() { var senderShape = threshOf(2, threshOf(1, 3), threshOf(1, 3), threshOf(2, 3)); var sigOne = senderShape.signedWith(sigs(sigs(OFF, OFF, ON), sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF))); var sigTwo = senderShape.signedWith(sigs(sigs(OFF, OFF, OFF), sigs(ON, ON, ON), sigs(OFF, OFF, OFF))); @@ -311,7 +311,7 @@ private Key lowerThirdNestedThresholdSigningReq(Key source) { } @HapiTest - private HapiSpec nestedSigningReqsWorkAsExpected() { + final HapiSpec nestedSigningReqsWorkAsExpected() { var senderShape = threshOf(2, threshOf(1, 3), threshOf(1, 3), threshOf(1, 3)); var sigOne = senderShape.signedWith(sigs(sigs(OFF, OFF, ON), sigs(OFF, OFF, OFF), sigs(OFF, OFF, OFF))); var sigTwo = senderShape.signedWith(sigs(sigs(OFF, OFF, OFF), sigs(OFF, ON, OFF), sigs(OFF, OFF, OFF))); @@ -343,7 +343,7 @@ private HapiSpec nestedSigningReqsWorkAsExpected() { getAccountBalance(receiver).hasTinyBars(1L)); } - private HapiSpec receiverSigRequiredNotConfusedByOrder() { + final HapiSpec receiverSigRequiredNotConfusedByOrder() { var senderShape = threshOf(1, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); var sigTwo = senderShape.signedWith(sigs(OFF, ON, OFF)); @@ -380,7 +380,7 @@ private HapiSpec receiverSigRequiredNotConfusedByOrder() { } @HapiTest - private HapiSpec receiverSigRequiredNotConfusedByMultiSigSender() { + final HapiSpec receiverSigRequiredNotConfusedByMultiSigSender() { var senderShape = threshOf(1, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); var sigTwo = senderShape.signedWith(sigs(OFF, ON, OFF)); @@ -417,7 +417,7 @@ private HapiSpec receiverSigRequiredNotConfusedByMultiSigSender() { } @HapiTest - private HapiSpec receiverSigRequiredUpdateIsRecognized() { + final HapiSpec receiverSigRequiredUpdateIsRecognized() { var senderShape = threshOf(2, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); var sigTwo = senderShape.signedWith(sigs(OFF, ON, OFF)); @@ -458,7 +458,7 @@ private HapiSpec receiverSigRequiredUpdateIsRecognized() { } @HapiTest - private HapiSpec scheduleAlreadyExecutedOnCreateDoesntRepeatTransaction() { + final HapiSpec scheduleAlreadyExecutedOnCreateDoesntRepeatTransaction() { var senderShape = threshOf(1, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); var sigTwo = senderShape.signedWith(sigs(OFF, ON, OFF)); @@ -494,7 +494,7 @@ private HapiSpec scheduleAlreadyExecutedOnCreateDoesntRepeatTransaction() { } @HapiTest - private HapiSpec scheduleAlreadyExecutedDoesntRepeatTransaction() { + final HapiSpec scheduleAlreadyExecutedDoesntRepeatTransaction() { var senderShape = threshOf(2, 3); var sigOne = senderShape.signedWith(sigs(ON, OFF, OFF)); var sigTwo = senderShape.signedWith(sigs(OFF, ON, OFF)); @@ -528,7 +528,7 @@ private HapiSpec scheduleAlreadyExecutedDoesntRepeatTransaction() { } @HapiTest - private HapiSpec basicSignatureCollectionWorks() { + final HapiSpec basicSignatureCollectionWorks() { var txnBody = cryptoTransfer(tinyBarsFromTo(SENDER, RECEIVER, 1)); return defaultHapiSpec("BasicSignatureCollectionWorks") @@ -542,7 +542,7 @@ private HapiSpec basicSignatureCollectionWorks() { } @HapiTest - private HapiSpec signalsIrrelevantSig() { + final HapiSpec signalsIrrelevantSig() { var txnBody = cryptoTransfer(tinyBarsFromTo(SENDER, RECEIVER, 1)); return defaultHapiSpec("SignalsIrrelevantSig") @@ -559,7 +559,7 @@ private HapiSpec signalsIrrelevantSig() { } @HapiTest - private HapiSpec signalsIrrelevantSigEvenAfterLinkedEntityUpdate() { + final HapiSpec signalsIrrelevantSigEvenAfterLinkedEntityUpdate() { var txnBody = mintToken(TOKEN_A, 50000000L); return defaultHapiSpec("SignalsIrrelevantSigEvenAfterLinkedEntityUpdate") @@ -586,7 +586,7 @@ private HapiSpec signalsIrrelevantSigEvenAfterLinkedEntityUpdate() { } @HapiTest - private HapiSpec addingSignaturesToNonExistingTxFails() { + final HapiSpec addingSignaturesToNonExistingTxFails() { return defaultHapiSpec("AddingSignaturesToNonExistingTxFails") .given(cryptoCreate(SENDER), newKeyNamed(SOMEBODY)) .when() @@ -597,7 +597,7 @@ private HapiSpec addingSignaturesToNonExistingTxFails() { .hasKnownStatus(INVALID_SCHEDULE_ID)); } - private HapiSpec addingSignaturesToExecutedTxFails() { + final HapiSpec addingSignaturesToExecutedTxFails() { var txnBody = cryptoCreate(SOMEBODY); var creation = "basicCryptoCreate"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/streaming/RecordStreamValidation.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/streaming/RecordStreamValidation.java index 6347e71cd937..d17c49245b72 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/streaming/RecordStreamValidation.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/streaming/RecordStreamValidation.java @@ -44,7 +44,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec recordStreamSanityChecks() { + final HapiSpec recordStreamSanityChecks() { AtomicReference pathToStreams = new AtomicReference<>(PATH_TO_LOCAL_STREAMS); return defaultHapiSpec("RecordStreamSanityChecks") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/streaming/RunTransfers.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/streaming/RunTransfers.java index 7f5d6a54412f..f41851dee3c3 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/streaming/RunTransfers.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/streaming/RunTransfers.java @@ -60,7 +60,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec runTransfers() { + final HapiSpec runTransfers() { return defaultHapiSpec("RunTransfers") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/GasLimitThrottlingSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/GasLimitThrottlingSuite.java index b3c820c101d4..326596daf100 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/GasLimitThrottlingSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/GasLimitThrottlingSuite.java @@ -60,7 +60,7 @@ public static void main(String... args) { } @HapiTest - private HapiSpec txsUnderGasLimitAllowed() { + final HapiSpec txsUnderGasLimitAllowed() { final var NUM_CALLS = 10; final Map startingProps = new HashMap<>(); return defaultHapiSpec("TXsUnderGasLimitAllowed") @@ -98,7 +98,7 @@ private HapiSpec txsUnderGasLimitAllowed() { } @HapiTest - private HapiSpec txOverGasLimitThrottled() { + final HapiSpec txOverGasLimitThrottled() { final Map startingProps = new HashMap<>(); final var MAX_GAS_PER_SECOND = 1_000_001L; return defaultHapiSpec("TXOverGasLimitThrottled") diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/PrivilegedOpsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/PrivilegedOpsSuite.java index f58aa5163797..d62316922700 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/PrivilegedOpsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/PrivilegedOpsSuite.java @@ -100,7 +100,7 @@ public List getSpecsInSuite() { .toArray(HapiSpecOperation[]::new); @HapiTest - private HapiSpec freezeAdminPrivilegesAsExpected() { + final HapiSpec freezeAdminPrivilegesAsExpected() { return defaultHapiSpec("freezeAdminPrivilegesAsExpected") .given( cryptoCreate(CIVILIAN), @@ -143,7 +143,7 @@ private HapiSpec freezeAdminPrivilegesAsExpected() { } @HapiTest - private HapiSpec systemAccountUpdatePrivilegesAsExpected() { + final HapiSpec systemAccountUpdatePrivilegesAsExpected() { final var tmpTreasury = "tmpTreasury"; return defaultHapiSpec("systemAccountUpdatePrivilegesAsExpected") .given(newKeyNamed(tmpTreasury), newKeyNamed(NEW_88), cryptoCreate(CIVILIAN)) @@ -197,7 +197,7 @@ private HapiSpec systemAccountUpdatePrivilegesAsExpected() { } @HapiTest - private HapiSpec superusersAreNeverThrottledOnTransfers() { + final HapiSpec superusersAreNeverThrottledOnTransfers() { return defaultHapiSpec("superusersAreNeverThrottledOnTransfers") .given( cryptoTransfer(tinyBarsFromTo(GENESIS, ADDRESS_BOOK_CONTROL, 1_000_000_000_000L)) @@ -218,7 +218,7 @@ private HapiSpec superusersAreNeverThrottledOnTransfers() { } @HapiTest - private HapiSpec superusersAreNeverThrottledOnMiscTxns() { + final HapiSpec superusersAreNeverThrottledOnMiscTxns() { return defaultHapiSpec("superusersAreNeverThrottledOnMiscTxns") .given( cryptoTransfer(tinyBarsFromTo(GENESIS, ADDRESS_BOOK_CONTROL, 1_000_000_000_000L)) @@ -239,7 +239,7 @@ private HapiSpec superusersAreNeverThrottledOnMiscTxns() { } @HapiTest - private HapiSpec superusersAreNeverThrottledOnHcsTxns() { + final HapiSpec superusersAreNeverThrottledOnHcsTxns() { return defaultHapiSpec("superusersAreNeverThrottledOnHcsTxns") .given( cryptoTransfer(tinyBarsFromTo(GENESIS, ADDRESS_BOOK_CONTROL, 1_000_000_000_000L)), @@ -257,7 +257,7 @@ private HapiSpec superusersAreNeverThrottledOnHcsTxns() { } @HapiTest - private HapiSpec superusersAreNeverThrottledOnMiscQueries() { + final HapiSpec superusersAreNeverThrottledOnMiscQueries() { return defaultHapiSpec("superusersAreNeverThrottledOnMiscQueries") .given( cryptoTransfer(tinyBarsFromTo(GENESIS, ADDRESS_BOOK_CONTROL, 1_000_000_000_000L)), @@ -275,7 +275,7 @@ private HapiSpec superusersAreNeverThrottledOnMiscQueries() { } @HapiTest - private HapiSpec superusersAreNeverThrottledOnHcsQueries() { + final HapiSpec superusersAreNeverThrottledOnHcsQueries() { return defaultHapiSpec("superusersAreNeverThrottledOnHcsQueries") .given( cryptoTransfer(tinyBarsFromTo(GENESIS, ADDRESS_BOOK_CONTROL, 1_000_000_000_000L)), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/ThrottleDefValidationSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/ThrottleDefValidationSuite.java index dc7fcce25dca..5a21f57fdf7f 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/ThrottleDefValidationSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/throttling/ThrottleDefValidationSuite.java @@ -66,7 +66,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec updateWithMissingTokenMintFails() { + final HapiSpec updateWithMissingTokenMintFails() { var missingMintThrottles = protoDefsFromResource("testSystemFiles/throttles-sans-mint.json"); return defaultHapiSpec("updateWithMissingTokenMintFails") @@ -80,7 +80,7 @@ private HapiSpec updateWithMissingTokenMintFails() { @HapiTest @Order(100) // this needs to be executed after all other tests - private HapiSpec ensureDefaultsRestored() { + final HapiSpec ensureDefaultsRestored() { var defaultThrottles = protoDefsFromResource("testSystemFiles/throttles-dev.json"); return defaultHapiSpec("EnsureDefaultsRestored") @@ -97,7 +97,7 @@ private HapiSpec ensureDefaultsRestored() { } @HapiTest - private HapiSpec throttleUpdateWithZeroGroupOpsPerSecFails() { + final HapiSpec throttleUpdateWithZeroGroupOpsPerSecFails() { var zeroOpsPerSecThrottles = protoDefsFromResource("testSystemFiles/zero-ops-group.json"); return defaultHapiSpec("ThrottleUpdateWithZeroGroupOpsPerSecFails") @@ -110,7 +110,7 @@ private HapiSpec throttleUpdateWithZeroGroupOpsPerSecFails() { } @HapiTest - private HapiSpec throttleUpdateRejectsMultiGroupAssignment() { + final HapiSpec throttleUpdateRejectsMultiGroupAssignment() { var multiGroupThrottles = protoDefsFromResource("testSystemFiles/duplicated-operation.json"); return defaultHapiSpec("ThrottleUpdateRejectsMultiGroupAssignment") @@ -123,7 +123,7 @@ private HapiSpec throttleUpdateRejectsMultiGroupAssignment() { } @HapiTest - private HapiSpec throttleDefsRejectUnauthorizedPayers() { + final HapiSpec throttleDefsRejectUnauthorizedPayers() { return defaultHapiSpec("ThrottleDefsRejectUnauthorizedPayers") .given( cryptoCreate("civilian"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/Hip17UnhappyAccountsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/Hip17UnhappyAccountsSuite.java index 89ec93071607..9f7c29c39ebe 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/Hip17UnhappyAccountsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/Hip17UnhappyAccountsSuite.java @@ -83,7 +83,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec uniqueTokenOperationsFailForDeletedAccount() { + final HapiSpec uniqueTokenOperationsFailForDeletedAccount() { return defaultHapiSpec("UniqueTokenOperationsFailForDeletedAccount") .given( newKeyNamed(SUPPLY_KEY), @@ -117,7 +117,7 @@ private HapiSpec uniqueTokenOperationsFailForDeletedAccount() { } @HapiTest - private HapiSpec uniqueTokenOperationsFailForKycRevokedAccount() { + final HapiSpec uniqueTokenOperationsFailForKycRevokedAccount() { return defaultHapiSpec("UniqueTokenOperationsFailForKycRevokedAccount") .given( newKeyNamed(SUPPLY_KEY), @@ -154,7 +154,7 @@ private HapiSpec uniqueTokenOperationsFailForKycRevokedAccount() { } @HapiTest - private HapiSpec uniqueTokenOperationsFailForFrozenAccount() { + final HapiSpec uniqueTokenOperationsFailForFrozenAccount() { return defaultHapiSpec("UniqueTokenOperationsFailForFrozenAccount") .given( newKeyNamed(SUPPLY_KEY), @@ -191,7 +191,7 @@ private HapiSpec uniqueTokenOperationsFailForFrozenAccount() { } @HapiTest - private HapiSpec uniqueTokenOperationsFailForDissociatedAccount() { + final HapiSpec uniqueTokenOperationsFailForDissociatedAccount() { return defaultHapiSpec("UniqueTokenOperationsFailForDissociatedAccount") .given( newKeyNamed(SUPPLY_KEY), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/Hip17UnhappyTokensSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/Hip17UnhappyTokensSuite.java index 3e7e210e2b4e..038a796cedda 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/Hip17UnhappyTokensSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/Hip17UnhappyTokensSuite.java @@ -127,7 +127,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec canStillGetNftInfoWhenDeleted() { + final HapiSpec canStillGetNftInfoWhenDeleted() { return defaultHapiSpec("canStillGetNftInfoWhenDeleted") .given( newKeyNamed(SUPPLY_KEY), @@ -146,7 +146,7 @@ private HapiSpec canStillGetNftInfoWhenDeleted() { } @HapiTest - private HapiSpec cannotTransferNftWhenDeleted() { + final HapiSpec cannotTransferNftWhenDeleted() { return defaultHapiSpec("cannotTransferNftWhenDeleted") .given( newKeyNamed(SUPPLY_KEY), @@ -171,7 +171,7 @@ private HapiSpec cannotTransferNftWhenDeleted() { } @HapiTest - private HapiSpec cannotUnfreezeNftWhenDeleted() { + final HapiSpec cannotUnfreezeNftWhenDeleted() { return defaultHapiSpec("cannotUnfreezeNftWhenDeleted") .given( newKeyNamed(SUPPLY_KEY), @@ -191,7 +191,7 @@ private HapiSpec cannotUnfreezeNftWhenDeleted() { } @HapiTest - private HapiSpec cannotFreezeNftWhenDeleted() { + final HapiSpec cannotFreezeNftWhenDeleted() { return defaultHapiSpec("cannotFreezeNftWhenDeleted") .given( newKeyNamed(SUPPLY_KEY), @@ -210,7 +210,7 @@ private HapiSpec cannotFreezeNftWhenDeleted() { } @HapiTest - private HapiSpec cannotDissociateNftWhenDeleted() { + final HapiSpec cannotDissociateNftWhenDeleted() { return defaultHapiSpec("cannotDissociateNftWhenDeleted") .given( newKeyNamed(ADMIN_KEY), @@ -230,7 +230,7 @@ private HapiSpec cannotDissociateNftWhenDeleted() { } @HapiTest - private HapiSpec cannotAssociateNftWhenDeleted() { + final HapiSpec cannotAssociateNftWhenDeleted() { return defaultHapiSpec("cannotAssociateNftWhenDeleted") .given( newKeyNamed(ADMIN_KEY), @@ -316,7 +316,7 @@ public HapiSpec cannotUpdateNftWhenDeleted() { } @HapiTest - private HapiSpec cannotUpdateNftFeeScheduleWhenDeleted() { + final HapiSpec cannotUpdateNftFeeScheduleWhenDeleted() { final var origHbarFee = 1_234L; final var newHbarFee = 4_321L; final var hbarCollector = "hbarFee"; @@ -343,7 +343,7 @@ private HapiSpec cannotUpdateNftFeeScheduleWhenDeleted() { } @HapiTest - private HapiSpec cannotMintNftWhenDeleted() { + final HapiSpec cannotMintNftWhenDeleted() { return defaultHapiSpec("cannotMintNftWhenDeleted") .given( newKeyNamed(SUPPLY_KEY), @@ -364,7 +364,7 @@ private HapiSpec cannotMintNftWhenDeleted() { } @HapiTest - private HapiSpec cannotBurnNftWhenDeleted() { + final HapiSpec cannotBurnNftWhenDeleted() { return defaultHapiSpec("cannotBurnNftWhenDeleted") .given( newKeyNamed(SUPPLY_KEY), @@ -395,7 +395,7 @@ private HapiSpec cannotBurnNftWhenDeleted() { } @HapiTest - private HapiSpec cannotWipeNftWhenDeleted() { + final HapiSpec cannotWipeNftWhenDeleted() { return defaultHapiSpec("cannotWipeNftWhenDeleted") .given( newKeyNamed(SUPPLY_KEY), @@ -427,7 +427,7 @@ private HapiSpec cannotWipeNftWhenDeleted() { } @HapiTest - private HapiSpec cannotGetNftInfoWhenExpired() { + final HapiSpec cannotGetNftInfoWhenExpired() { return defaultHapiSpec("cannotGetNftInfoWhenExpired") .given( tokenOpsEnablement(), @@ -449,7 +449,7 @@ private HapiSpec cannotGetNftInfoWhenExpired() { } @HapiTest - private HapiSpec cannotGetNftInfoWhenAutoRemoved() { + final HapiSpec cannotGetNftInfoWhenAutoRemoved() { return defaultHapiSpec("cannotGetNftInfoWhenAutoRemoved") .given( tokenOpsEnablement(), @@ -489,7 +489,7 @@ private HapiSpec cannotGetNftInfoWhenAutoRemoved() { } @HapiTest - private HapiSpec autoRemovalCasesSuiteCleanup() { + final HapiSpec autoRemovalCasesSuiteCleanup() { return defaultHapiSpec("AutoRemovalCasesSuiteCleanup") .given() .when() diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationV1SecurityModelSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationV1SecurityModelSpecs.java index 39cc8f8a54b3..08ba74ff0e7d 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationV1SecurityModelSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationV1SecurityModelSpecs.java @@ -72,7 +72,7 @@ public boolean canRunConcurrent() { return false; } - private HapiSpec multiAssociationWithSameRepeatedTokenAsExpected() { + final HapiSpec multiAssociationWithSameRepeatedTokenAsExpected() { final var nfToken = "nfToken"; final var civilian = "civilian"; final var multiAssociate = "multiAssociate"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java index e4b42fc84906..c51ee19fcf04 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java @@ -162,7 +162,7 @@ public List getSpecsInSuite() { * automatic associations limit defined by https://hips.hedera.com/hip/hip-23. */ @HapiTest - private HapiSpec validateNewTokenAssociations() { + final HapiSpec validateNewTokenAssociations() { final String notToBeToken = "notToBeToken"; final String hbarCollector = "hbarCollector"; final String fractionalCollector = "fractionalCollector"; @@ -246,7 +246,7 @@ private HapiSpec validateNewTokenAssociations() { * Validates the default values for a {@code TokenCreate}'s token type (fungible) and supply type (infinite). */ @HapiTest - private HapiSpec createsFungibleInfiniteByDefault() { + final HapiSpec createsFungibleInfiniteByDefault() { return defaultHapiSpec("CreatesFungibleInfiniteByDefault") .given() .when(tokenCreate("DefaultFungible")) @@ -256,7 +256,7 @@ private HapiSpec createsFungibleInfiniteByDefault() { } @HapiTest - private HapiSpec worksAsExpectedWithDefaultTokenId() { + final HapiSpec worksAsExpectedWithDefaultTokenId() { return defaultHapiSpec("WorksAsExpectedWithDefaultTokenId") .given() .when() @@ -793,7 +793,7 @@ public HapiSpec onlyValidCustomFeeScheduleCanBeCreated() { } @HapiTest - private HapiSpec feeCollectorSigningReqsWorkForTokenCreate() { + final HapiSpec feeCollectorSigningReqsWorkForTokenCreate() { return defaultHapiSpec("feeCollectorSigningReqsWorkForTokenCreate") .given( newKeyNamed(customFeesKey), @@ -974,7 +974,7 @@ public HapiSpec treasuryHasCorrectBalance() { } @HapiTest - private HapiSpec prechecksWork() { + final HapiSpec prechecksWork() { return defaultHapiSpec("PrechecksWork") .given( cryptoCreate(TOKEN_TREASURY) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java index 07a1f7c3493c..dfd316750cfc 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java @@ -81,7 +81,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec treasuryBecomesDeletableAfterTokenDelete() { + final HapiSpec treasuryBecomesDeletableAfterTokenDelete() { return defaultHapiSpec("TreasuryBecomesDeletableAfterTokenDelete") .given( newKeyNamed(TOKEN_ADMIN), @@ -99,7 +99,7 @@ private HapiSpec treasuryBecomesDeletableAfterTokenDelete() { } @HapiTest - private HapiSpec deletionValidatesAlreadyDeletedToken() { + final HapiSpec deletionValidatesAlreadyDeletedToken() { return defaultHapiSpec("DeletionValidatesAlreadyDeletedToken") .given( newKeyNamed(MULTI_KEY), @@ -111,7 +111,7 @@ private HapiSpec deletionValidatesAlreadyDeletedToken() { } @HapiTest - private HapiSpec deletionValidatesMissingAdminKey() { + final HapiSpec deletionValidatesMissingAdminKey() { return defaultHapiSpec("DeletionValidatesMissingAdminKey") .given( newKeyNamed(MULTI_KEY), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenFeeScheduleUpdateSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenFeeScheduleUpdateSpecs.java index e988c60b59da..7b7d38042a75 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenFeeScheduleUpdateSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenFeeScheduleUpdateSpecs.java @@ -72,7 +72,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec baseOperationIsChargedExpectedFee() { + final HapiSpec baseOperationIsChargedExpectedFee() { final var htsAmount = 2_345L; final var targetToken = "immutableToken"; final var feeDenom = "denom"; @@ -99,7 +99,7 @@ private HapiSpec baseOperationIsChargedExpectedFee() { } @HapiTest - private HapiSpec onlyValidCustomFeeScheduleCanBeUpdated() { + final HapiSpec onlyValidCustomFeeScheduleCanBeUpdated() { final var hbarAmount = 1_234L; final var htsAmount = 2_345L; final var numerator = 1; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenManagementSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenManagementSpecs.java index ddf4049bab82..4f2c9f764996 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenManagementSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenManagementSpecs.java @@ -123,7 +123,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec zeroUnitTokenOperationsWorkAsExpected() { + final HapiSpec zeroUnitTokenOperationsWorkAsExpected() { final var civilian = "civilian"; final var adminKey = "adminKey"; final var fungible = "fungible"; @@ -181,7 +181,7 @@ private HapiSpec zeroUnitTokenOperationsWorkAsExpected() { } @HapiTest - private HapiSpec frozenTreasuryCannotBeMintedOrBurned() { + final HapiSpec frozenTreasuryCannotBeMintedOrBurned() { return defaultHapiSpec("FrozenTreasuryCannotBeMintedOrBurned") .given( newKeyNamed(SUPPLY_KEY), @@ -202,7 +202,7 @@ private HapiSpec frozenTreasuryCannotBeMintedOrBurned() { } @HapiTest - private HapiSpec revokedKYCTreasuryCannotBeMintedOrBurned() { + final HapiSpec revokedKYCTreasuryCannotBeMintedOrBurned() { return defaultHapiSpec("RevokedKYCTreasuryCannotBeMintedOrBurned") .given( newKeyNamed(SUPPLY_KEY), @@ -223,7 +223,7 @@ private HapiSpec revokedKYCTreasuryCannotBeMintedOrBurned() { } @HapiTest - private HapiSpec burnTokenFailsDueToInsufficientTreasuryBalance() { + final HapiSpec burnTokenFailsDueToInsufficientTreasuryBalance() { final String BURN_TOKEN = "burn"; final int TOTAL_SUPPLY = 100; final int TRANSFER_AMOUNT = 50; @@ -448,7 +448,7 @@ public HapiSpec supplyMgmtSuccessCasesWork() { } @HapiTest - private HapiSpec fungibleCommonMaxSupplyReachWork() { + final HapiSpec fungibleCommonMaxSupplyReachWork() { return defaultHapiSpec("FungibleCommonMaxSupplyReachWork") .given( newKeyNamed(SUPPLY_KEY), @@ -475,7 +475,7 @@ private HapiSpec fungibleCommonMaxSupplyReachWork() { } @HapiTest - private HapiSpec mintingMaxLongValueWorks() { + final HapiSpec mintingMaxLongValueWorks() { return defaultHapiSpec("MintingMaxLongValueWorks") .given( newKeyNamed(SUPPLY_KEY), @@ -491,7 +491,7 @@ private HapiSpec mintingMaxLongValueWorks() { } @HapiTest - private HapiSpec nftMintProvidesMintedNftsAndNewTotalSupply() { + final HapiSpec nftMintProvidesMintedNftsAndNewTotalSupply() { final var multiKey = "multi"; final var token = "non-fungible"; final var txn = "mint"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenManagementSpecsStateful.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenManagementSpecsStateful.java index 61e397e1d9dc..ebd1efdea477 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenManagementSpecsStateful.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenManagementSpecsStateful.java @@ -110,7 +110,7 @@ public HapiSpec freezeMgmtFailureCasesWork() { } @HapiTest - private HapiSpec nftMintingCapIsEnforced() { + final HapiSpec nftMintingCapIsEnforced() { return defaultHapiSpec("NftMintingCapIsEnforced") .given( newKeyNamed("supplyKey"), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenPauseSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenPauseSpecs.java index 5d3b61dac460..c33e832174ef 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenPauseSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenPauseSpecs.java @@ -124,7 +124,7 @@ public boolean canRunConcurrent() { } @HapiTest - private HapiSpec cannotAddPauseKeyViaTokenUpdate() { + final HapiSpec cannotAddPauseKeyViaTokenUpdate() { return defaultHapiSpec("CannotAddPauseKeyViaTokenUpdate") .given(newKeyNamed(PAUSE_KEY), newKeyNamed(ADMIN_KEY)) .when(tokenCreate(PRIMARY), tokenCreate(SECONDARY).adminKey(ADMIN_KEY)) @@ -134,7 +134,7 @@ private HapiSpec cannotAddPauseKeyViaTokenUpdate() { } @HapiTest - private HapiSpec cannotPauseWithInvalidPauseKey() { + final HapiSpec cannotPauseWithInvalidPauseKey() { return defaultHapiSpec("cannotPauseWithInvalidPauseKey") .given(newKeyNamed(PAUSE_KEY), newKeyNamed(OTHER_KEY)) .when(tokenCreate(PRIMARY).pauseKey(PAUSE_KEY)) @@ -142,7 +142,7 @@ private HapiSpec cannotPauseWithInvalidPauseKey() { } @HapiTest - private HapiSpec pausedTokenInCustomFeeCaseStudy() { + final HapiSpec pausedTokenInCustomFeeCaseStudy() { return defaultHapiSpec("PausedTokenInCustomFeeCaseStudy") .given( cryptoCreate(TOKEN_TREASURY), @@ -187,7 +187,7 @@ private HapiSpec pausedTokenInCustomFeeCaseStudy() { } @HapiTest - private HapiSpec unpauseWorks() { + final HapiSpec unpauseWorks() { final String firstUser = FIRST_USER; final String token = PRIMARY; @@ -222,7 +222,7 @@ private HapiSpec unpauseWorks() { } @HapiTest - private HapiSpec pausedNonFungibleUniqueCannotBeUsed() { + final HapiSpec pausedNonFungibleUniqueCannotBeUsed() { final String uniqueToken = "nonFungibleUnique"; final String firstUser = FIRST_USER; final String secondUser = SECOND_USER; @@ -304,7 +304,7 @@ private HapiSpec pausedNonFungibleUniqueCannotBeUsed() { } @HapiTest - private HapiSpec pausedFungibleTokenCannotBeUsed() { + final HapiSpec pausedFungibleTokenCannotBeUsed() { final String token = PRIMARY; final String otherToken = SECONDARY; final String firstUser = FIRST_USER; @@ -384,7 +384,7 @@ private HapiSpec pausedFungibleTokenCannotBeUsed() { } @HapiTest - private HapiSpec cannotChangePauseStatusIfMissingPauseKey() { + final HapiSpec cannotChangePauseStatusIfMissingPauseKey() { return defaultHapiSpec("CannotChangePauseStatusIfMissingPauseKey") .given(cryptoCreate(TOKEN_TREASURY)) .when( @@ -414,7 +414,7 @@ private HapiSpec cannotChangePauseStatusIfMissingPauseKey() { } @HapiTest - private HapiSpec basePauseAndUnpauseHaveExpectedPrices() { + final HapiSpec basePauseAndUnpauseHaveExpectedPrices() { final var expectedBaseFee = 0.001; final var token = "token"; final var tokenPauseTransaction = "tokenPauseTxn"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUnhappyAccountsSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUnhappyAccountsSuite.java index edbfc843aa71..dd29c48e03b7 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUnhappyAccountsSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUnhappyAccountsSuite.java @@ -98,7 +98,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec uniqueTokenOperationsFailForAutoRemovedAccount() { + final HapiSpec uniqueTokenOperationsFailForAutoRemovedAccount() { return defaultHapiSpec("UniqueTokenOperationsFailForAutoRemovedAccount") .given( fileUpdate(APP_PROPERTIES) @@ -138,7 +138,7 @@ private HapiSpec uniqueTokenOperationsFailForAutoRemovedAccount() { wipeTokenAccount(UNIQUE_TOKEN_A, CLIENT_1, List.of(1L)).hasKnownStatus(INVALID_ACCOUNT_ID)); } - private HapiSpec uniqueTokenOperationsFailForExpiredAccount() { + final HapiSpec uniqueTokenOperationsFailForExpiredAccount() { return defaultHapiSpec("UniqueTokenOperationsFailForExpiredAccount") .given( fileUpdate(APP_PROPERTIES) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java index e83d3236bf34..68cbb3f81227 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java @@ -137,7 +137,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec validatesNewExpiry() { + final HapiSpec validatesNewExpiry() { final var smallBuffer = 12_345L; final var okExpiry = defaultMaxLifetime + Instant.now().getEpochSecond() - smallBuffer; final var excessiveExpiry = defaultMaxLifetime + Instant.now().getEpochSecond() + smallBuffer; @@ -150,7 +150,7 @@ private HapiSpec validatesNewExpiry() { } @HapiTest - private HapiSpec validatesAlreadyDeletedToken() { + final HapiSpec validatesAlreadyDeletedToken() { return defaultHapiSpec("ValidatesAlreadyDeletedToken") .given( newKeyNamed("adminKey"), @@ -162,7 +162,7 @@ private HapiSpec validatesAlreadyDeletedToken() { } @HapiTest - private HapiSpec tokensCanBeMadeImmutableWithEmptyKeyList() { + final HapiSpec tokensCanBeMadeImmutableWithEmptyKeyList() { final var mutableForNow = "mutableForNow"; return defaultHapiSpec("TokensCanBeMadeImmutableWithEmptyKeyList") .given( @@ -181,7 +181,7 @@ private HapiSpec tokensCanBeMadeImmutableWithEmptyKeyList() { } @HapiTest - private HapiSpec standardImmutabilitySemanticsHold() { + final HapiSpec standardImmutabilitySemanticsHold() { long then = Instant.now().getEpochSecond() + 1_234_567L; final var immutable = "immutable"; return defaultHapiSpec("StandardImmutabilitySemanticsHold") @@ -194,7 +194,7 @@ private HapiSpec standardImmutabilitySemanticsHold() { } @HapiTest - private HapiSpec validatesMissingRef() { + final HapiSpec validatesMissingRef() { return defaultHapiSpec("ValidatesMissingRef") .given(cryptoCreate(PAYER)) .when() @@ -212,7 +212,7 @@ private HapiSpec validatesMissingRef() { } @HapiTest - private HapiSpec validatesMissingAdminKey() { + final HapiSpec validatesMissingAdminKey() { return defaultHapiSpec("ValidatesMissingAdminKey") .given( cryptoCreate(TOKEN_TREASURY).balance(0L), @@ -620,7 +620,7 @@ public HapiSpec updateNftTreasuryHappyPath() { } @HapiTest - private HapiSpec safeToUpdateCustomFeesWithNewFallbackWhileTransferring() { + final HapiSpec safeToUpdateCustomFeesWithNewFallbackWhileTransferring() { final var uniqueTokenFeeKey = "uniqueTokenFeeKey"; final var hbarCollector = "hbarFee"; final var beneficiary = "luckyOne"; @@ -666,7 +666,7 @@ private HapiSpec safeToUpdateCustomFeesWithNewFallbackWhileTransferring() { } @HapiTest - private HapiSpec customFeesOnlyUpdatableWithKey() { + final HapiSpec customFeesOnlyUpdatableWithKey() { final var origHbarFee = 1_234L; final var newHbarFee = 4_321L; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/UniqueTokenManagementSpecs.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/UniqueTokenManagementSpecs.java index c4cb1d00818f..e4c30244f05e 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/UniqueTokenManagementSpecs.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/token/UniqueTokenManagementSpecs.java @@ -143,7 +143,7 @@ public List getSpecsInSuite() { } @HapiTest - private HapiSpec populatingMetadataForFungibleDoesNotWork() { + final HapiSpec populatingMetadataForFungibleDoesNotWork() { return defaultHapiSpec("PopulatingMetadataForFungibleDoesNotWork") .given( newKeyNamed(SUPPLY_KEY), @@ -175,7 +175,7 @@ private HapiSpec populatingMetadataForFungibleDoesNotWork() { } @HapiTest - private HapiSpec populatingAmountForNonFungibleDoesNotWork() { + final HapiSpec populatingAmountForNonFungibleDoesNotWork() { return defaultHapiSpec("PopulatingAmountForNonFungibleDoesNotWork") .given( newKeyNamed(SUPPLY_KEY), @@ -202,7 +202,7 @@ private HapiSpec populatingAmountForNonFungibleDoesNotWork() { } @HapiTest - private HapiSpec finiteNftReachesMaxSupplyProperly() { + final HapiSpec finiteNftReachesMaxSupplyProperly() { return defaultHapiSpec("FiniteNftReachesMaxSupplyProperly") .given( newKeyNamed(SUPPLY_KEY), @@ -236,7 +236,7 @@ private HapiSpec finiteNftReachesMaxSupplyProperly() { } @HapiTest - private HapiSpec serialNumbersOnlyOnFungibleBurnFails() { + final HapiSpec serialNumbersOnlyOnFungibleBurnFails() { return defaultHapiSpec("SerialNumbersOnlyOnFungibleBurnFails") .given( newKeyNamed(SUPPLY_KEY), @@ -263,7 +263,7 @@ private HapiSpec serialNumbersOnlyOnFungibleBurnFails() { } @HapiTest - private HapiSpec amountOnlyOnNonFungibleBurnFails() { + final HapiSpec amountOnlyOnNonFungibleBurnFails() { return defaultHapiSpec("AmountOnlyOnNonFungibleBurnFails") .given( newKeyNamed(SUPPLY_KEY), @@ -290,7 +290,7 @@ private HapiSpec amountOnlyOnNonFungibleBurnFails() { } @HapiTest - private HapiSpec burnWorksWhenAccountsAreFrozenByDefault() { + final HapiSpec burnWorksWhenAccountsAreFrozenByDefault() { return defaultHapiSpec("BurnWorksWhenAccountsAreFrozenByDefault") .given( newKeyNamed(SUPPLY_KEY), @@ -310,7 +310,7 @@ private HapiSpec burnWorksWhenAccountsAreFrozenByDefault() { } @HapiTest - private HapiSpec burnFailsOnInvalidSerialNumber() { + final HapiSpec burnFailsOnInvalidSerialNumber() { return defaultHapiSpec("BurnFailsOnInvalidSerialNumber") .given( newKeyNamed(SUPPLY_KEY), @@ -329,7 +329,7 @@ private HapiSpec burnFailsOnInvalidSerialNumber() { } @HapiTest - private HapiSpec burnRespectsBurnBatchConstraints() { + final HapiSpec burnRespectsBurnBatchConstraints() { return defaultHapiSpec("BurnRespectsBurnBatchConstraints") .given( newKeyNamed(SUPPLY_KEY), @@ -349,7 +349,7 @@ private HapiSpec burnRespectsBurnBatchConstraints() { } @HapiTest - private HapiSpec burnHappyPath() { + final HapiSpec burnHappyPath() { return defaultHapiSpec("BurnHappyPath") .given( newKeyNamed(SUPPLY_KEY), @@ -372,7 +372,7 @@ private HapiSpec burnHappyPath() { } @HapiTest - private HapiSpec canOnlyBurnFromTreasury() { + final HapiSpec canOnlyBurnFromTreasury() { final var nonTreasury = "anybodyElse"; return defaultHapiSpec("CanOnlyBurnFromTreasury") @@ -401,7 +401,7 @@ private HapiSpec canOnlyBurnFromTreasury() { } @HapiTest - private HapiSpec treasuryBalanceCorrectAfterBurn() { + final HapiSpec treasuryBalanceCorrectAfterBurn() { return defaultHapiSpec("TreasuryBalanceCorrectAfterBurn") .given( newKeyNamed(SUPPLY_KEY), @@ -428,7 +428,7 @@ private HapiSpec treasuryBalanceCorrectAfterBurn() { } @HapiTest - private HapiSpec mintDistinguishesFeeSubTypes() { + final HapiSpec mintDistinguishesFeeSubTypes() { return defaultHapiSpec("MintDistinguishesFeeSubTypes") .given( newKeyNamed(SUPPLY_KEY), @@ -467,7 +467,7 @@ private HapiSpec mintDistinguishesFeeSubTypes() { } @HapiTest - private HapiSpec mintFailsWithTooLongMetadata() { + final HapiSpec mintFailsWithTooLongMetadata() { return defaultHapiSpec("MintFailsWithTooLongMetadata") .given( newKeyNamed(SUPPLY_KEY), @@ -483,7 +483,7 @@ private HapiSpec mintFailsWithTooLongMetadata() { } @HapiTest - private HapiSpec mintFailsWithInvalidMetadataFromBatch() { + final HapiSpec mintFailsWithInvalidMetadataFromBatch() { return defaultHapiSpec("MintFailsWithInvalidMetadataFromBatch") .given( newKeyNamed(SUPPLY_KEY), @@ -500,7 +500,7 @@ private HapiSpec mintFailsWithInvalidMetadataFromBatch() { } @HapiTest - private HapiSpec mintFailsWithLargeBatchSize() { + final HapiSpec mintFailsWithLargeBatchSize() { return defaultHapiSpec("MintFailsWithLargeBatchSize") .given( newKeyNamed(SUPPLY_KEY), @@ -516,7 +516,7 @@ private HapiSpec mintFailsWithLargeBatchSize() { } @HapiTest - private HapiSpec mintUniqueTokenHappyPath() { + final HapiSpec mintUniqueTokenHappyPath() { return defaultHapiSpec("MintUniqueTokenHappyPath") .given( newKeyNamed(SUPPLY_KEY), @@ -553,7 +553,7 @@ private HapiSpec mintUniqueTokenHappyPath() { } @HapiTest - private HapiSpec mintTokenWorksWhenAccountsAreFrozenByDefault() { + final HapiSpec mintTokenWorksWhenAccountsAreFrozenByDefault() { return defaultHapiSpec("MintTokenWorksWhenAccountsAreFrozenByDefault") .given( newKeyNamed(SUPPLY_KEY), @@ -577,7 +577,7 @@ private HapiSpec mintTokenWorksWhenAccountsAreFrozenByDefault() { } @HapiTest - private HapiSpec mintFailsWithDeletedToken() { + final HapiSpec mintFailsWithDeletedToken() { return defaultHapiSpec("MintFailsWithDeletedToken") .given( newKeyNamed(SUPPLY_KEY), @@ -595,7 +595,7 @@ private HapiSpec mintFailsWithDeletedToken() { } @HapiTest - private HapiSpec getTokenNftInfoFailsWithNoNft() { + final HapiSpec getTokenNftInfoFailsWithNoNft() { return defaultHapiSpec("GetTokenNftInfoFailsWithNoNft") .given(newKeyNamed(SUPPLY_KEY), cryptoCreate(TOKEN_TREASURY)) .when( @@ -613,7 +613,7 @@ private HapiSpec getTokenNftInfoFailsWithNoNft() { } @HapiTest - private HapiSpec getTokenNftInfoWorks() { + final HapiSpec getTokenNftInfoWorks() { return defaultHapiSpec("GetTokenNftInfoWorks") .given(newKeyNamed(SUPPLY_KEY), cryptoCreate(TOKEN_TREASURY)) .when( @@ -637,7 +637,7 @@ private HapiSpec getTokenNftInfoWorks() { } @HapiTest - private HapiSpec mintUniqueTokenWorksWithRepeatedMetadata() { + final HapiSpec mintUniqueTokenWorksWithRepeatedMetadata() { return defaultHapiSpec("MintUniqueTokenWorksWithRepeatedMetadata") .given( newKeyNamed(SUPPLY_KEY), @@ -667,7 +667,7 @@ private HapiSpec mintUniqueTokenWorksWithRepeatedMetadata() { } @HapiTest - private HapiSpec wipeHappyPath() { + final HapiSpec wipeHappyPath() { return onlyDefaultHapiSpec("WipeHappyPath") .given( newKeyNamed(SUPPLY_KEY), @@ -699,7 +699,7 @@ private HapiSpec wipeHappyPath() { } @HapiTest - private HapiSpec wipeRespectsConstraints() { + final HapiSpec wipeRespectsConstraints() { return defaultHapiSpec("WipeRespectsConstraints") .given( newKeyNamed(SUPPLY_KEY), @@ -725,7 +725,7 @@ private HapiSpec wipeRespectsConstraints() { } @HapiTest - private HapiSpec commonWipeFailsWhenInvokedOnUniqueToken() { + final HapiSpec commonWipeFailsWhenInvokedOnUniqueToken() { return defaultHapiSpec("CommonWipeFailsWhenInvokedOnUniqueToken") .given( newKeyNamed(SUPPLY_KEY), @@ -757,7 +757,7 @@ private HapiSpec commonWipeFailsWhenInvokedOnUniqueToken() { } @HapiTest - private HapiSpec uniqueWipeFailsWhenInvokedOnFungibleToken() { // invokes unique wipe on fungible tokens + final HapiSpec uniqueWipeFailsWhenInvokedOnFungibleToken() { // invokes unique wipe on fungible tokens return defaultHapiSpec("UniqueWipeFailsWhenInvokedOnFungibleToken") .given( newKeyNamed(WIPE_KEY), @@ -784,7 +784,7 @@ private HapiSpec uniqueWipeFailsWhenInvokedOnFungibleToken() { // invokes unique } @HapiTest - private HapiSpec wipeFailsWithInvalidSerialNumber() { + final HapiSpec wipeFailsWithInvalidSerialNumber() { return defaultHapiSpec("WipeFailsWithInvalidSerialNumber") .given( newKeyNamed(SUPPLY_KEY), @@ -806,7 +806,7 @@ private HapiSpec wipeFailsWithInvalidSerialNumber() { } @HapiTest - private HapiSpec mintUniqueTokenReceiptCheck() { + final HapiSpec mintUniqueTokenReceiptCheck() { final var mintTransferTxn = "mintTransferTxn"; return defaultHapiSpec("mintUniqueTokenReceiptCheck") .given( @@ -846,7 +846,7 @@ private HapiSpec mintUniqueTokenReceiptCheck() { } @HapiTest - private HapiSpec tokenDissociateHappyPath() { + final HapiSpec tokenDissociateHappyPath() { return defaultHapiSpec("tokenDissociateHappyPath") .given( newKeyNamed(SUPPLY_KEY), @@ -865,7 +865,7 @@ private HapiSpec tokenDissociateHappyPath() { } @HapiTest - private HapiSpec tokenDissociateFailsIfAccountOwnsUniqueTokens() { + final HapiSpec tokenDissociateFailsIfAccountOwnsUniqueTokens() { return defaultHapiSpec("tokenDissociateFailsIfAccountOwnsUniqueTokens") .given( newKeyNamed(SUPPLY_KEY), diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/util/UtilPrngSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/util/UtilPrngSuite.java index ae277d3b0769..4c4bbe1c8b08 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/util/UtilPrngSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/util/UtilPrngSuite.java @@ -55,7 +55,7 @@ private List positiveTests() { } @HapiTest - private HapiSpec usdFeeAsExpected() { + final HapiSpec usdFeeAsExpected() { double baseFee = 0.001; double plusRangeFee = 0.0010010316; @@ -83,7 +83,7 @@ private HapiSpec usdFeeAsExpected() { } @HapiTest - private HapiSpec failsInPreCheckForNegativeRange() { + final HapiSpec failsInPreCheckForNegativeRange() { return defaultHapiSpec("failsInPreCheckForNegativeRange") .given( overridingAllOf(Map.of(PRNG_IS_ENABLED, "true")), @@ -99,7 +99,7 @@ private HapiSpec failsInPreCheckForNegativeRange() { } @HapiTest - private HapiSpec happyPathWorksForRangeAndBitString() { + final HapiSpec happyPathWorksForRangeAndBitString() { final var rangeTxn = "prngWithRange"; final var rangeTxn1 = "prngWithRange1"; final var prngWithoutRange = "prngWithoutRange"; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/validation/TokenPuvSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/validation/TokenPuvSuite.java index 9c02578fe80a..7fd54c1e91a6 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/validation/TokenPuvSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/validation/TokenPuvSuite.java @@ -64,7 +64,7 @@ public List getSpecsInSuite() { }); } - private HapiSpec initialFunding() { + final HapiSpec initialFunding() { return HapiSpec.customHapiSpec("InitialFunding") .withProperties(targetInfo.toCustomProperties(miscConfig)) .given( @@ -94,7 +94,7 @@ private HapiSpec initialFunding() { .balance(Amounts.BESTOWED_CAT_TOKENS))); } - private HapiSpec initialAssociation() { + final HapiSpec initialAssociation() { return HapiSpec.customHapiSpec("InitialAssociation") .withProperties(targetInfo.toCustomProperties(miscConfig)) .given( @@ -112,7 +112,7 @@ private HapiSpec initialAssociation() { .kyc(TokenKycStatus.KycNotApplicable))); } - private HapiSpec cleanupIfNecessary() { + final HapiSpec cleanupIfNecessary() { return HapiSpec.customHapiSpec("CleanupIfNecessary") .withProperties(targetInfo.toCustomProperties(miscConfig)) .given()