Search in sources :

Example 6 with SUCCESS

use of com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS in project hedera-services by hashgraph.

the class TokenTransferBasicLoadTest method activeTokenAssociatesFactory.

private Function<HapiApiSpec, OpProvider> activeTokenAssociatesFactory(PerfTestLoadSettings settings) {
    int numTotalTokens = settings.getTotalTokens();
    int numActiveTokenAccounts = settings.getTotalTestTokenAccounts();
    int totalClients = settings.getTotalClients();
    int numActiveTokens = (totalClients >= 1) ? numTotalTokens / totalClients : numTotalTokens;
    AtomicLong remainingAssociations = new AtomicLong(numActiveTokens * numActiveTokenAccounts - 1);
    if (log.isDebugEnabled()) {
        log.debug("Total active token accounts {}, total test tokens {}, my portion of tokens {}", numActiveTokenAccounts, numTotalTokens, numActiveTokens);
    }
    long startAccountId = settings.getTestTreasureStartAccount();
    return spec -> new OpProvider() {

        @Override
        public List<HapiSpecOperation> suggestedInitializers() {
            return Collections.emptyList();
        }

        @Override
        public Optional<HapiSpecOperation> get() {
            long nextAssocId;
            if ((nextAssocId = remainingAssociations.getAndDecrement()) < 0) {
                return Optional.empty();
            }
            int curToken = (int) nextAssocId / numActiveTokenAccounts;
            long curAccount = nextAssocId % numActiveTokenAccounts;
            var accountId = "0.0." + (startAccountId + curAccount);
            var op = tokenAssociate(accountId, tokenRegistryName(curToken)).payingWith(DEFAULT_PAYER).signedBy(DEFAULT_PAYER).hasRetryPrecheckFrom(BUSY, PLATFORM_TRANSACTION_NOT_CREATED, DUPLICATE_TRANSACTION, INSUFFICIENT_PAYER_BALANCE).hasPrecheckFrom(DUPLICATE_TRANSACTION, OK).hasKnownStatusFrom(SUCCESS, TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT, INVALID_TOKEN_ID, TRANSACTION_EXPIRED, TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED, FAIL_INVALID, OK).fee(ONE_HUNDRED_HBARS).noLogging().suppressStats(true).deferStatusResolution();
            return Optional.of(op);
        }
    };
}
Also used : TxnVerbs.tokenAssociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate) UtilVerbs.runWithProvider(com.hedera.services.bdd.spec.utilops.UtilVerbs.runWithProvider) INSUFFICIENT_PAYER_BALANCE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_PAYER_BALANCE) OK(com.hederahashgraph.api.proto.java.ResponseCodeEnum.OK) UtilVerbs.sourcing(com.hedera.services.bdd.spec.utilops.UtilVerbs.sourcing) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) Random(java.util.Random) TRANSACTION_EXPIRED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TRANSACTION_EXPIRED) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) PerfTestLoadSettings(com.hedera.services.bdd.suites.perf.PerfTestLoadSettings) Function(java.util.function.Function) Supplier(java.util.function.Supplier) EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS) UtilVerbs.sleepFor(com.hedera.services.bdd.spec.utilops.UtilVerbs.sleepFor) TokenMovement.moving(com.hedera.services.bdd.spec.transactions.token.TokenMovement.moving) DUPLICATE_TRANSACTION(com.hederahashgraph.api.proto.java.ResponseCodeEnum.DUPLICATE_TRANSACTION) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) INSUFFICIENT_TOKEN_BALANCE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_TOKEN_BALANCE) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) OpProvider(com.hedera.services.bdd.spec.infrastructure.OpProvider) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED) LoadTest(com.hedera.services.bdd.spec.utilops.LoadTest) UNKNOWN(com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNKNOWN) TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT) FAIL_INVALID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FAIL_INVALID) INVALID_TOKEN_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_ID) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) TOKEN_NOT_ASSOCIATED_TO_ACCOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_NOT_ASSOCIATED_TO_ACCOUNT) TimeUnit(java.util.concurrent.TimeUnit) AtomicLong(java.util.concurrent.atomic.AtomicLong) List(java.util.List) Logger(org.apache.logging.log4j.Logger) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) Optional(java.util.Optional) BUSY(com.hederahashgraph.api.proto.java.ResponseCodeEnum.BUSY) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) LogManager(org.apache.logging.log4j.LogManager) Collections(java.util.Collections) PLATFORM_TRANSACTION_NOT_CREATED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.PLATFORM_TRANSACTION_NOT_CREATED) AtomicLong(java.util.concurrent.atomic.AtomicLong) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) OpProvider(com.hedera.services.bdd.spec.infrastructure.OpProvider)

Example 7 with SUCCESS

use of com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS in project hedera-services by hashgraph.

the class FileAppendTransitionLogicTest method happyPathFlowsForSpecialFile.

@Test
void happyPathFlowsForSpecialFile() {
    // setup:
    InOrder inOrder = inOrder(hfs, txnCtx);
    givenTxnCtxAppending(TargetType.SPECIAL);
    // and:
    given(hfs.append(any(), any())).willReturn(success);
    // when:
    subject.doStateTransition();
    // then:
    inOrder.verify(hfs).append(argThat(special::equals), argThat(bytes -> Arrays.equals(moreContents, bytes)));
    inOrder.verify(txnCtx).setStatus(SUCCESS);
}
Also used : StateView(com.hedera.services.context.primitives.StateView) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) FileNumbers(com.hedera.services.config.FileNumbers) HFileMeta(com.hedera.services.files.HFileMeta) TieredHederaFs(com.hedera.services.files.TieredHederaFs) BDDMockito.inOrder(org.mockito.BDDMockito.inOrder) Duration(com.hederahashgraph.api.proto.java.Duration) TransactionContext(com.hedera.services.context.TransactionContext) MerkleNetworkContext(com.hedera.services.state.merkle.MerkleNetworkContext) BDDMockito.any(org.mockito.BDDMockito.any) BDDMockito.verify(org.mockito.BDDMockito.verify) FileAppendTransactionBody(com.hederahashgraph.api.proto.java.FileAppendTransactionBody) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) FILE_DELETED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FILE_DELETED) BDDMockito.given(org.mockito.BDDMockito.given) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) PlatformTxnAccessor(com.hedera.services.utils.PlatformTxnAccessor) TxnHandlingScenario(com.hedera.test.factories.scenarios.TxnHandlingScenario) PREPARED_UPDATE_FILE_IS_IMMUTABLE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.PREPARED_UPDATE_FILE_IS_IMMUTABLE) MAX_FILE_SIZE_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MAX_FILE_SIZE_EXCEEDED) FileID(com.hederahashgraph.api.proto.java.FileID) InOrder(org.mockito.InOrder) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) ResponseCodeEnum(com.hederahashgraph.api.proto.java.ResponseCodeEnum) FEE_SCHEDULE_FILE_PART_UPLOADED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FEE_SCHEDULE_FILE_PART_UPLOADED) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) FAIL_INVALID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FAIL_INVALID) HederaFs(com.hedera.services.files.HederaFs) Instant(java.time.Instant) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) IdUtils(com.hedera.test.utils.IdUtils) ByteString(com.google.protobuf.ByteString) Test(org.junit.jupiter.api.Test) MiscUtils(com.hedera.services.utils.MiscUtils) SimpleUpdateResult(com.hedera.services.files.SimpleUpdateResult) JKey(com.hedera.services.legacy.core.jproto.JKey) INVALID_FILE_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_FILE_ID) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) UNAUTHORIZED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNAUTHORIZED) BDDMockito.argThat(org.mockito.BDDMockito.argThat) BDDMockito.mock(org.mockito.BDDMockito.mock) MockFileNumbers(com.hedera.services.config.MockFileNumbers) InOrder(org.mockito.InOrder) Test(org.junit.jupiter.api.Test)

Example 8 with SUCCESS

use of com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS in project hedera-services by hashgraph.

the class FileAppendTransitionLogicTest method happyPathFlowsForNonSpecialFile.

@Test
void happyPathFlowsForNonSpecialFile() {
    // setup:
    InOrder inOrder = inOrder(hfs, txnCtx);
    givenTxnCtxAppending(TargetType.VALID);
    // and:
    given(hfs.append(any(), any())).willReturn(success);
    // when:
    subject.doStateTransition();
    // then:
    inOrder.verify(hfs).append(argThat(target::equals), argThat(bytes -> Arrays.equals(moreContents, bytes)));
    inOrder.verify(txnCtx).setStatus(SUCCESS);
}
Also used : StateView(com.hedera.services.context.primitives.StateView) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) FileNumbers(com.hedera.services.config.FileNumbers) HFileMeta(com.hedera.services.files.HFileMeta) TieredHederaFs(com.hedera.services.files.TieredHederaFs) BDDMockito.inOrder(org.mockito.BDDMockito.inOrder) Duration(com.hederahashgraph.api.proto.java.Duration) TransactionContext(com.hedera.services.context.TransactionContext) MerkleNetworkContext(com.hedera.services.state.merkle.MerkleNetworkContext) BDDMockito.any(org.mockito.BDDMockito.any) BDDMockito.verify(org.mockito.BDDMockito.verify) FileAppendTransactionBody(com.hederahashgraph.api.proto.java.FileAppendTransactionBody) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) FILE_DELETED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FILE_DELETED) BDDMockito.given(org.mockito.BDDMockito.given) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) PlatformTxnAccessor(com.hedera.services.utils.PlatformTxnAccessor) TxnHandlingScenario(com.hedera.test.factories.scenarios.TxnHandlingScenario) PREPARED_UPDATE_FILE_IS_IMMUTABLE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.PREPARED_UPDATE_FILE_IS_IMMUTABLE) MAX_FILE_SIZE_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MAX_FILE_SIZE_EXCEEDED) FileID(com.hederahashgraph.api.proto.java.FileID) InOrder(org.mockito.InOrder) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) ResponseCodeEnum(com.hederahashgraph.api.proto.java.ResponseCodeEnum) FEE_SCHEDULE_FILE_PART_UPLOADED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FEE_SCHEDULE_FILE_PART_UPLOADED) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) FAIL_INVALID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FAIL_INVALID) HederaFs(com.hedera.services.files.HederaFs) Instant(java.time.Instant) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) IdUtils(com.hedera.test.utils.IdUtils) ByteString(com.google.protobuf.ByteString) Test(org.junit.jupiter.api.Test) MiscUtils(com.hedera.services.utils.MiscUtils) SimpleUpdateResult(com.hedera.services.files.SimpleUpdateResult) JKey(com.hedera.services.legacy.core.jproto.JKey) INVALID_FILE_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_FILE_ID) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) UNAUTHORIZED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNAUTHORIZED) BDDMockito.argThat(org.mockito.BDDMockito.argThat) BDDMockito.mock(org.mockito.BDDMockito.mock) MockFileNumbers(com.hedera.services.config.MockFileNumbers) InOrder(org.mockito.InOrder) Test(org.junit.jupiter.api.Test)

Example 9 with SUCCESS

use of com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS in project hedera-services by hashgraph.

the class FileUpdateTransitionLogicTest method allowsSysAdminToUpdateImmutableSysFile.

@Test
void allowsSysAdminToUpdateImmutableSysFile() {
    givenTxnCtxUpdating(EnumSet.of(UpdateTarget.CONTENTS), sysFileTarget);
    given(txnCtx.activePayer()).willReturn(sysAdmin);
    // and:
    given(hfs.exists(sysFileTarget)).willReturn(true);
    given(hfs.getattr(sysFileTarget)).willReturn(immutableAttr);
    // and:
    given(hfs.overwrite(any(), any())).willReturn(new SimpleUpdateResult(false, true, SUCCESS));
    given(hfs.setattr(any(), any())).willReturn(new SimpleUpdateResult(true, false, SUCCESS));
    // when:
    subject.doStateTransition();
    // then:
    verify(hfs).overwrite(argThat(sysFileTarget::equals), argThat(bytes -> Arrays.equals(newContents, bytes)));
    verify(txnCtx).setStatus(SUCCESS);
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) OK(com.hederahashgraph.api.proto.java.ResponseCodeEnum.OK) Arrays(java.util.Arrays) HFileMeta(com.hedera.services.files.HFileMeta) BDDMockito.inOrder(org.mockito.BDDMockito.inOrder) StringValue(com.google.protobuf.StringValue) Duration(com.hederahashgraph.api.proto.java.Duration) BDDMockito.verify(org.mockito.BDDMockito.verify) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) BDDMockito.given(org.mockito.BDDMockito.given) PlatformTxnAccessor(com.hedera.services.utils.PlatformTxnAccessor) EnumSet(java.util.EnumSet) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) DecoderException(org.apache.commons.codec.DecoderException) BDDMockito.never(org.mockito.BDDMockito.never) SigImpactHistorian(com.hedera.services.ledger.SigImpactHistorian) Instant(java.time.Instant) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) OptionValidator(com.hedera.services.txns.validation.OptionValidator) ByteString(com.google.protobuf.ByteString) Test(org.junit.jupiter.api.Test) MiscUtils(com.hedera.services.utils.MiscUtils) JKey(com.hedera.services.legacy.core.jproto.JKey) AUTORENEW_DURATION_NOT_IN_RANGE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.AUTORENEW_DURATION_NOT_IN_RANGE) INVALID_FILE_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_FILE_ID) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) UNAUTHORIZED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNAUTHORIZED) EntityNumbers(com.hedera.services.config.EntityNumbers) INVALID_EXPIRATION_TIME(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_EXPIRATION_TIME) StateView(com.hedera.services.context.primitives.StateView) TieredHederaFs(com.hedera.services.files.TieredHederaFs) AUTHORIZATION_FAILED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.AUTHORIZATION_FAILED) TransactionContext(com.hedera.services.context.TransactionContext) MerkleNetworkContext(com.hedera.services.state.merkle.MerkleNetworkContext) BDDMockito.any(org.mockito.BDDMockito.any) ArgumentCaptor(org.mockito.ArgumentCaptor) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) FILE_DELETED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FILE_DELETED) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) AccountID(com.hederahashgraph.api.proto.java.AccountID) TxnHandlingScenario(com.hedera.test.factories.scenarios.TxnHandlingScenario) Timestamp(com.hederahashgraph.api.proto.java.Timestamp) PREPARED_UPDATE_FILE_IS_IMMUTABLE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.PREPARED_UPDATE_FILE_IS_IMMUTABLE) FileUpdateTransactionBody(com.hederahashgraph.api.proto.java.FileUpdateTransactionBody) MAX_FILE_SIZE_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MAX_FILE_SIZE_EXCEEDED) FileID(com.hederahashgraph.api.proto.java.FileID) InOrder(org.mockito.InOrder) MockEntityNumbers(com.hedera.services.config.MockEntityNumbers) INVALID_ZERO_BYTE_IN_STRING(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ZERO_BYTE_IN_STRING) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) FAIL_INVALID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FAIL_INVALID) HederaFs(com.hedera.services.files.HederaFs) IdUtils(com.hedera.test.utils.IdUtils) Key(com.hederahashgraph.api.proto.java.Key) SimpleUpdateResult(com.hedera.services.files.SimpleUpdateResult) BAD_ENCODING(com.hederahashgraph.api.proto.java.ResponseCodeEnum.BAD_ENCODING) BDDMockito.argThat(org.mockito.BDDMockito.argThat) BDDMockito.mock(org.mockito.BDDMockito.mock) SimpleUpdateResult(com.hedera.services.files.SimpleUpdateResult) Test(org.junit.jupiter.api.Test)

Example 10 with SUCCESS

use of com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS in project hedera-services by hashgraph.

the class FileUpdateTransitionLogicTest method doesntAllowSysAdminToUpdateImmutableNonSysFile.

@Test
void doesntAllowSysAdminToUpdateImmutableNonSysFile() {
    givenTxnCtxUpdating(EnumSet.of(UpdateTarget.CONTENTS), nonSysFileTarget);
    given(txnCtx.activePayer()).willReturn(sysAdmin);
    // and:
    given(hfs.exists(nonSysFileTarget)).willReturn(true);
    given(hfs.getattr(nonSysFileTarget)).willReturn(immutableAttr);
    // and:
    given(hfs.overwrite(any(), any())).willReturn(new SimpleUpdateResult(false, true, SUCCESS));
    given(hfs.setattr(any(), any())).willReturn(new SimpleUpdateResult(true, false, SUCCESS));
    // when:
    subject.doStateTransition();
    // then:
    verify(hfs, never()).overwrite(argThat(nonSysFileTarget::equals), argThat(bytes -> Arrays.equals(newContents, bytes)));
    verify(txnCtx).setStatus(UNAUTHORIZED);
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) OK(com.hederahashgraph.api.proto.java.ResponseCodeEnum.OK) Arrays(java.util.Arrays) HFileMeta(com.hedera.services.files.HFileMeta) BDDMockito.inOrder(org.mockito.BDDMockito.inOrder) StringValue(com.google.protobuf.StringValue) Duration(com.hederahashgraph.api.proto.java.Duration) BDDMockito.verify(org.mockito.BDDMockito.verify) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) BDDMockito.given(org.mockito.BDDMockito.given) PlatformTxnAccessor(com.hedera.services.utils.PlatformTxnAccessor) EnumSet(java.util.EnumSet) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) DecoderException(org.apache.commons.codec.DecoderException) BDDMockito.never(org.mockito.BDDMockito.never) SigImpactHistorian(com.hedera.services.ledger.SigImpactHistorian) Instant(java.time.Instant) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) OptionValidator(com.hedera.services.txns.validation.OptionValidator) ByteString(com.google.protobuf.ByteString) Test(org.junit.jupiter.api.Test) MiscUtils(com.hedera.services.utils.MiscUtils) JKey(com.hedera.services.legacy.core.jproto.JKey) AUTORENEW_DURATION_NOT_IN_RANGE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.AUTORENEW_DURATION_NOT_IN_RANGE) INVALID_FILE_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_FILE_ID) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) UNAUTHORIZED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNAUTHORIZED) EntityNumbers(com.hedera.services.config.EntityNumbers) INVALID_EXPIRATION_TIME(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_EXPIRATION_TIME) StateView(com.hedera.services.context.primitives.StateView) TieredHederaFs(com.hedera.services.files.TieredHederaFs) AUTHORIZATION_FAILED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.AUTHORIZATION_FAILED) TransactionContext(com.hedera.services.context.TransactionContext) MerkleNetworkContext(com.hedera.services.state.merkle.MerkleNetworkContext) BDDMockito.any(org.mockito.BDDMockito.any) ArgumentCaptor(org.mockito.ArgumentCaptor) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) FILE_DELETED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FILE_DELETED) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) AccountID(com.hederahashgraph.api.proto.java.AccountID) TxnHandlingScenario(com.hedera.test.factories.scenarios.TxnHandlingScenario) Timestamp(com.hederahashgraph.api.proto.java.Timestamp) PREPARED_UPDATE_FILE_IS_IMMUTABLE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.PREPARED_UPDATE_FILE_IS_IMMUTABLE) FileUpdateTransactionBody(com.hederahashgraph.api.proto.java.FileUpdateTransactionBody) MAX_FILE_SIZE_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MAX_FILE_SIZE_EXCEEDED) FileID(com.hederahashgraph.api.proto.java.FileID) InOrder(org.mockito.InOrder) MockEntityNumbers(com.hedera.services.config.MockEntityNumbers) INVALID_ZERO_BYTE_IN_STRING(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ZERO_BYTE_IN_STRING) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) FAIL_INVALID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.FAIL_INVALID) HederaFs(com.hedera.services.files.HederaFs) IdUtils(com.hedera.test.utils.IdUtils) Key(com.hederahashgraph.api.proto.java.Key) SimpleUpdateResult(com.hedera.services.files.SimpleUpdateResult) BAD_ENCODING(com.hederahashgraph.api.proto.java.ResponseCodeEnum.BAD_ENCODING) BDDMockito.argThat(org.mockito.BDDMockito.argThat) BDDMockito.mock(org.mockito.BDDMockito.mock) SimpleUpdateResult(com.hedera.services.files.SimpleUpdateResult) Test(org.junit.jupiter.api.Test)

Aggregations

SUCCESS (com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS)27 List (java.util.List)21 HapiApiSpec (com.hedera.services.bdd.spec.HapiApiSpec)20 LogManager (org.apache.logging.log4j.LogManager)20 Logger (org.apache.logging.log4j.Logger)20 UtilVerbs.withOpContext (com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext)18 HapiApiSpec.defaultHapiSpec (com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec)16 HapiSpecOperation (com.hedera.services.bdd.spec.HapiSpecOperation)15 TxnVerbs.cryptoCreate (com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate)15 TxnVerbs.cryptoTransfer (com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer)13 ResponseCodeEnum (com.hederahashgraph.api.proto.java.ResponseCodeEnum)11 TxnVerbs.tokenCreate (com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate)10 CustomSpecAssert.allRunFor (com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor)10 AccountID (com.hederahashgraph.api.proto.java.AccountID)10 OK (com.hederahashgraph.api.proto.java.ResponseCodeEnum.OK)10 ByteString (com.google.protobuf.ByteString)9 TxnVerbs.fileCreate (com.hedera.services.bdd.spec.transactions.TxnVerbs.fileCreate)9 TxnVerbs.tokenAssociate (com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate)9 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)9 TokenMovement.moving (com.hedera.services.bdd.spec.transactions.token.TokenMovement.moving)8