Repository: hashgraph/hedera-services
Issue: HTS-Restart-Performance-Random-10k-61m failed with Unhandled error while processing :: signedTransactionBytes

<!--  Thanks for submitting a bug report!  Before submitting:
1. Try searching the existing issues to see if your issue has already been reported
2. If you're reporting a security vulnerability, please email security@hedera.com instead of opening an issue
-->

**Summary of the defect**
HTS-Restart-Performance-Random-10k-61m failed during TokenAssociateTransitionLogic.

**How to reproduce (if possible)**
Run test `HTS-Restart-Performance-Random-10k-61m`.

**Service logs (if applicable)**
```
2021-02-08 05:58:07.178 WARN  70   TokenAssociateTransitionLogic - Unhandled error while processing :: signedTransactionBytes: "\\nS\\n\\027\\n\\021\\b\\262\\245\\203\\201\\006\\020\\244\\373\\377\\377\\377\\377\\377\\377\\377\\001\\022\\002\\030\\002\\022\\002\\030\\003\\030\\200\\310\\257\\240%\\"\\002\\bx2 \\303\\203\\302\\256\\303\\202\\302\\267\\303\\203\\302\\271tF8\\303\\202\\302\\256J\\303\\203\\302\\213\\303\\203\\302\\220\\303\\203\\302\\216\\302\\002\\a\\n\\003\\030\\350U\\022\\000\\022G\\nE\\n\\001\\n\\032@\\331\\332\\353\\315T\\3452\\235\\0300\\202\\331Hn\\200w>\\317%\\211\\017S\\270\\374\\312\\322\\3464:\\226r\\371\\\\\\264\\246\\363\\351\\341\\375\\020@\\027\\372\\332.:\\226\\317\\260\\324\\317\\022K\\v\\a\\377n\\177X\\252\\323\\317\\337\\v"
!
java.lang.NullPointerException: null
	at com.hedera.services.store.tokens.HederaTokenStore.fullySanityChecked(HederaTokenStore.java:616) ~[?:?]
	at com.hedera.services.store.tokens.HederaTokenStore.associate(HederaTokenStore.java:150) ~[?:?]
	at com.hedera.services.txns.token.TokenAssociateTransitionLogic.doStateTransition(TokenAssociateTransitionLogic.java:67) ~[?:?]
	at com.hedera.services.legacy.services.state.AwareProcessLogic.doProcess(AwareProcessLogic.java:231) ~[?:?]
	at com.hedera.services.legacy.services.state.AwareProcessLogic.processTxnInCtx(AwareProcessLogic.java:137) ~[?:?]
	at com.hedera.services.state.logic.ServicesTxnManager.process(ServicesTxnManager.java:59) ~[?:?]
	at com.hedera.services.legacy.services.state.AwareProcessLogic.incorporateConsensusTxn(AwareProcessLogic.java:107) ~[?:?]
	at com.hedera.services.ServicesState.handleTransaction(ServicesState.java:307) ~[?:?]
	at com.swirlds.platform.EventFlow.handleTransaction(EventFlow.java:731) ~[swirlds-platform-core-0.9.0-alpha.1.jar:?]
	at com.swirlds.platform.EventFlow.takeHandlePut(EventFlow.java:1259) ~[swirlds-platform-core-0.9.0-alpha.1.jar:?]
	at com.swirlds.platform.EventFlow.doCons(EventFlow.java:800) ~[swirlds-platform-core-0.9.0-alpha.1.jar:?]
	at com.swirlds.common.threading.StoppableThread.run(StoppableThread.java:248) ~[swirlds-common-0.9.0-alpha.1.jar:?]
	at java.lang.Thread.run(Thread.java:835) [?:?]
```


These are Warning Logs and should be ignored in `HederaNodeValidator` 

Also Error logs `ERROR  158  HapiTxnOp - signedTransactionBytes:` mentioned in `HAPIClientValidator` are from `regression.log` and all tests client logs passed successfully. 


Slack link : https://hedera-hashgraph.slack.com/archives/CKWHL8R9A/p1612767653364100

Changed files:
test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java
test-clients/src/main/java/com/hedera/services/bdd/spec/queries/schedule/HapiGetScheduleInfo.java
hedera-node/src/test/java/com/hedera/services/store/schedule/HederaScheduleStoreTest.java
test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java
test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java
test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenTransactSpecs.java
test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationSpecs.java
test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java
hedera-node/src/main/java/com/hedera/services/store/schedule/HederaScheduleStore.java
hedera-node/src/main/java/com/hedera/services/store/tokens/HederaTokenStore.java
test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java
test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/HapiTxnOp.java
hedera-node/src/test/java/com/hedera/services/store/tokens/HederaTokenStoreTest.java

diff --git a/hedera-node/src/main/java/com/hedera/services/store/schedule/HederaScheduleStore.java b/hedera-node/src/main/java/com/hedera/services/store/schedule/HederaScheduleStore.java
index 5e6806ed5c..adeebe7a25 100644
--- a/hedera-node/src/main/java/com/hedera/services/store/schedule/HederaScheduleStore.java
+++ b/hedera-node/src/main/java/com/hedera/services/store/schedule/HederaScheduleStore.java
@@ -96,7 +96,7 @@ public class HederaScheduleStore extends HederaStore implements ScheduleStore {
 
 	@Override
 	public boolean exists(ScheduleID id) {
-		return pendingId.equals(id) || schedules.get().containsKey(fromScheduleId(id));
+		return (isCreationPending() && pendingId.equals(id)) || schedules.get().containsKey(fromScheduleId(id));
 	}
 
 	@Override
diff --git a/hedera-node/src/main/java/com/hedera/services/store/tokens/HederaTokenStore.java b/hedera-node/src/main/java/com/hedera/services/store/tokens/HederaTokenStore.java
index 467eee55fc..ef7cb80ce7 100644
--- a/hedera-node/src/main/java/com/hedera/services/store/tokens/HederaTokenStore.java
+++ b/hedera-node/src/main/java/com/hedera/services/store/tokens/HederaTokenStore.java
@@ -234,7 +234,7 @@ public class HederaTokenStore extends HederaStore implements TokenStore {
 
 	@Override
 	public boolean exists(TokenID id) {
-		return pendingId.equals(id) || tokens.get().containsKey(fromTokenId(id));
+		return (isCreationPending() && pendingId.equals(id)) || tokens.get().containsKey(fromTokenId(id));
 	}
 
 	@Override
diff --git a/hedera-node/src/test/java/com/hedera/services/store/schedule/HederaScheduleStoreTest.java b/hedera-node/src/test/java/com/hedera/services/store/schedule/HederaScheduleStoreTest.java
index 2a77c9fd99..9dd6367c37 100644
--- a/hedera-node/src/test/java/com/hedera/services/store/schedule/HederaScheduleStoreTest.java
+++ b/hedera-node/src/test/java/com/hedera/services/store/schedule/HederaScheduleStoreTest.java
@@ -31,6 +31,7 @@ import com.hedera.services.state.merkle.MerkleEntityId;
 import com.hedera.services.state.merkle.MerkleSchedule;
 import com.hedera.services.state.submerkle.EntityId;
 import com.hedera.services.state.submerkle.RichInstant;
+import com.hedera.services.store.tokens.HederaTokenStore;
 import com.hedera.test.utils.IdUtils;
 import com.hedera.test.utils.TxnUtils;
 import com.hederahashgraph.api.proto.java.AccountID;
@@ -325,6 +326,12 @@ public class HederaScheduleStoreTest {
         assertSame(schedule, subject.get(created));
     }
 
+    @Test
+    public void existenceCheckUnderstandsPendingIdOnlyAppliesIfCreationPending() {
+        // expect:
+        assertFalse(subject.exists(HederaScheduleStore.NO_PENDING_ID));
+    }
+
     @Test
     public void rejectsCreateProvisionallyMissingPayer() {
         // given:
diff --git a/hedera-node/src/test/java/com/hedera/services/store/tokens/HederaTokenStoreTest.java b/hedera-node/src/test/java/com/hedera/services/store/tokens/HederaTokenStoreTest.java
index 6445ee25be..8e19755618 100644
--- a/hedera-node/src/test/java/com/hedera/services/store/tokens/HederaTokenStoreTest.java
+++ b/hedera-node/src/test/java/com/hedera/services/store/tokens/HederaTokenStoreTest.java
@@ -361,6 +361,12 @@ class HederaTokenStoreTest {
 		assertSame(token, subject.get(pending));
 	}
 
+	@Test
+	public void existenceCheckUnderstandsPendingIdOnlyAppliesIfCreationPending() {
+		// expect:
+		assertFalse(subject.exists(HederaTokenStore.NO_PENDING_ID));
+	}
+
 	@Test
 	public void existenceCheckIncludesPending() {
 		// setup:
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/schedule/HapiGetScheduleInfo.java b/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/schedule/HapiGetScheduleInfo.java
index f33ddf2c49..f62e96cab8 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/schedule/HapiGetScheduleInfo.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/spec/queries/schedule/HapiGetScheduleInfo.java
@@ -127,7 +127,6 @@ public class HapiGetScheduleInfo extends HapiQueryOp<HapiGetScheduleInfo> {
                 "Wrong schedule expiry!",
                 spec.registry());
 
-
         var registry = spec.registry();
 
         expectedSignatories.ifPresent(s -> {
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/HapiTxnOp.java b/test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/HapiTxnOp.java
index d137acf786..612e7761d9 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/HapiTxnOp.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/spec/transactions/HapiTxnOp.java
@@ -202,17 +202,18 @@ public abstract class HapiTxnOp<T extends HapiTxnOp<T>> extends HapiSpecOperatio
 //							"{} {} Wrong actual precheck status {}, not one of {}!",spec.logPrefix(), this,
 //							actualPrecheck,
 //							permissiblePrechecks.get());
-					throw new HapiTxnPrecheckStateException(
-							String.format("Wrong actual precheck status %s, expected %s", actualStatus,
-									permissibleStatuses.get()));
+					throw new HapiTxnPrecheckStateException(String.format(
+							"Wrong precheck status! Expected one of %s, actual %s",
+							permissibleStatuses.get(), actualStatus));
 				}
 			} else {
 				if (getExpectedPrecheck() != actualPrecheck) {
 					// Change to an info until HapiClientValidator can be modified and can understand new errors
 					log.info("{} {} Wrong actual precheck status {}, expecting {}", spec.logPrefix(), this,
 							actualPrecheck, getExpectedPrecheck());
-//					throw new HapiTxnPrecheckStateException(String.format("Wrong precheck status! expected %s, actual
-//					%s", getExpectedPrecheck(), actualPrecheck));
+					throw new HapiTxnPrecheckStateException(String.format(
+							"Wrong precheck status! Expected %s, actual %s",
+							getExpectedPrecheck(), actualPrecheck));
 				}
 			}
 		}
@@ -262,16 +263,18 @@ public abstract class HapiTxnOp<T extends HapiTxnOp<T>> extends HapiSpecOperatio
 						"{} {} Wrong actual status {}, not one of {}!", spec.logPrefix(), this,
 						actualStatus,
 						permissibleStatuses.get());
-				throw new HapiTxnCheckStateException(
-						String.format("Wrong actual status %s, expected %s", actualStatus, permissibleStatuses.get()));
+				throw new HapiTxnCheckStateException(String.format(
+						"Wrong status! Expected one of %s, was %s",
+						permissibleStatuses.get(), actualStatus));
 			}
 		} else {
 			if (getExpectedStatus() != actualStatus) {
 				// Change to an info until HapiClientValidator can be modified and can understand new errors
 				log.info("{} {} Wrong actual status {}, expected {}", spec.logPrefix(), this, actualStatus,
 						getExpectedStatus());
-//				throw new HapiTxnCheckStateException(String.format("Wrong actual status %s, expected %s", actualStatus,
-//				getExpectedStatus()));
+				throw new HapiTxnCheckStateException(String.format(
+						"Wrong status! Expected %s, was %s",
+						getExpectedStatus(), actualStatus));
 			}
 		}
 		if (!deferStatusResolution) {
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java b/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java
index ff5b52cdaf..abdd2612be 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleCreateSpecs.java
@@ -62,6 +62,7 @@ import static com.hedera.services.bdd.spec.utilops.UtilVerbs.overriding;
 import static com.hedera.services.bdd.spec.utilops.UtilVerbs.saveExpirations;
 import static com.hedera.services.bdd.spec.utilops.UtilVerbs.sleepFor;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ACCOUNT_ID;
+import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_SCHEDULE_ID;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.MEMO_TOO_LONG;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.SOME_SIGNATURES_WERE_INVALID;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNPARSEABLE_SCHEDULED_TRANSACTION;
@@ -116,6 +117,7 @@ public class ScheduleCreateSpecs extends HapiApiSuite {
 				allowsDoublingScheduledCreates(),
 				scheduledTXCreatedAfterPreviousIdenticalIsExecuted(),
 				preservesRevocationServiceSemanticsForFileDelete(),
+				worksAsExpectedWithDefaultScheduleId(),
 				suiteCleanup(),
 		});
 	}
@@ -134,6 +136,13 @@ public class ScheduleCreateSpecs extends HapiApiSuite {
 				);
 	}
 
+	private HapiApiSpec worksAsExpectedWithDefaultScheduleId() {
+		return defaultHapiSpec("WorksAsExpectedWithDefaultScheduleId")
+				.given( ).when( ).then(
+						getScheduleInfo("0.0.0").hasCostAnswerPrecheck(INVALID_SCHEDULE_ID)
+				);
+	}
+
 	private HapiApiSpec bodyOnlyCreation() {
 		return defaultHapiSpec("BodyOnlyCreation")
 				.given( ).when(
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java b/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java
index ae689bded0..ccd0df1425 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/suites/schedule/ScheduleDeleteSpecs.java
@@ -167,6 +167,8 @@ public class ScheduleDeleteSpecs extends HapiApiSuite {
 		return defaultHapiSpec("DeletingNonExistingFails")
 				.given().when().then(
 						scheduleDelete("0.0.534")
+								.hasKnownStatus(INVALID_SCHEDULE_ID),
+						scheduleDelete("0.0.0")
 								.hasKnownStatus(INVALID_SCHEDULE_ID)
 				);
 	}
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationSpecs.java b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationSpecs.java
index 1b65e79978..fc15d788cc 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationSpecs.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenAssociationSpecs.java
@@ -101,10 +101,19 @@ public class TokenAssociationSpecs extends HapiApiSuite {
 						expiredAndDeletedTokensStillAppearInContractInfo(),
 						dissociationFromExpiredTokensAsExpected(),
 						accountInfoQueriesAsExpected(),
+						handlesUseOfDefaultTokenId(),
 				}
 		);
 	}
 
+	public HapiApiSpec handlesUseOfDefaultTokenId() {
+		return defaultHapiSpec("HandlesUseOfDefaultTokenId")
+				.given( ).when( ).then(
+						tokenAssociate(DEFAULT_PAYER, "0.0.0")
+								.hasKnownStatus(INVALID_TOKEN_ID)
+				);
+	}
+
 	public HapiApiSpec associatedContractsMustHaveAdminKeys() {
 		String misc = "someToken";
 		String contract = "defaultContract";
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java
index e70dc04bbb..78a30ffc7a 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java
@@ -38,6 +38,7 @@ import java.util.stream.IntStream;
 import static com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec;
 import static com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountBalance;
 import static com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo;
+import static com.hedera.services.bdd.spec.queries.QueryVerbs.getScheduleInfo;
 import static com.hedera.services.bdd.spec.queries.QueryVerbs.getTokenInfo;
 import static com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord;
 import static com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate;
@@ -80,10 +81,19 @@ public class TokenCreateSpecs extends HapiApiSuite {
 						creationSetsCorrectExpiry(),
 						creationHappyPath(),
 						numAccountsAllowedIsDynamic(),
+						worksAsExpectedWithDefaultTokenId(),
 				}
 		);
 	}
 
+
+	private HapiApiSpec worksAsExpectedWithDefaultTokenId() {
+		return defaultHapiSpec("WorksAsExpectedWithDefaultTokenId")
+				.given().when().then(
+						getTokenInfo("0.0.0").hasCostAnswerPrecheck(INVALID_TOKEN_ID)
+				);
+	}
+
 	public HapiApiSpec autoRenewValidationWorks() {
 		return defaultHapiSpec("AutoRenewValidationWorks")
 				.given(
@@ -334,7 +344,7 @@ public class TokenCreateSpecs extends HapiApiSuite {
 				.given(
 						cryptoCreate(TOKEN_TREASURY).balance(0L),
 						recordSystemProperty("tokens.maxSymbolUtf8Bytes", Integer::parseInt, maxUtf8Bytes::set)
-				).when( ).then(
+				).when().then(
 						tokenCreate("missingSymbol")
 								.symbol("")
 								.hasPrecheck(MISSING_TOKEN_SYMBOL),
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java
index 94615abfe0..dda82f2953 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenDeleteSpecs.java
@@ -60,8 +60,8 @@ public class TokenDeleteSpecs extends HapiApiSuite {
 						deletionValidatesMissingAdminKey(),
 						deletionWorksAsExpected(),
 						deletionValidatesAlreadyDeletedToken(),
-						deletionValidatesRef(),
 						treasuryBecomesDeletableAfterTokenDelete(),
+						deletionValidatesRef(),
 				}
 		);
 	}
@@ -178,11 +178,11 @@ public class TokenDeleteSpecs extends HapiApiSuite {
 				.given(
 						cryptoCreate("payer")
 				).when().then(
-						tokenDelete("1.2.3")
+						tokenDelete("0.0.0")
 								.payingWith("payer")
 								.signedBy("payer")
 								.hasKnownStatus(INVALID_TOKEN_ID),
-						tokenDelete("0.0.0")
+						tokenDelete("1.2.3")
 								.payingWith("payer")
 								.signedBy("payer")
 								.hasKnownStatus(INVALID_TOKEN_ID)
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenTransactSpecs.java b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenTransactSpecs.java
index 297326f91a..0be2b76530 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenTransactSpecs.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenTransactSpecs.java
@@ -49,7 +49,9 @@ import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.EMPTY_TOKEN_TR
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_ACCOUNT_BALANCE;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_TOKEN_BALANCE;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ACCOUNT_AMOUNTS;
+import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ACCOUNT_ID;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_SIGNATURE;
+import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_ID;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED;
 import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN;
 
@@ -80,6 +82,7 @@ public class TokenTransactSpecs extends HapiApiSuite {
 						nonZeroTransfersRejected(),
 						prechecksWork(),
 						allRequiredSigsAreChecked(),
+						missingEntitiesRejected(),
 				}
 		);
 	}
@@ -142,6 +145,22 @@ public class TokenTransactSpecs extends HapiApiSuite {
 				);
 	}
 
+	public HapiApiSpec missingEntitiesRejected() {
+		return defaultHapiSpec("MissingTokensRejected")
+				.given(
+						tokenCreate("some").treasury(DEFAULT_PAYER)
+				).when().then(
+						cryptoTransfer(
+								moving(1L, "some")
+										.between(DEFAULT_PAYER, "0.0.0")
+						).signedBy(DEFAULT_PAYER).hasKnownStatus(INVALID_ACCOUNT_ID),
+						cryptoTransfer(
+								moving(100_000_000_000_000L, "0.0.0")
+										.between(DEFAULT_PAYER, FUNDING)
+						).signedBy(DEFAULT_PAYER).hasKnownStatus(INVALID_TOKEN_ID)
+				);
+	}
+
 	public HapiApiSpec balancesAreChecked() {
 		return defaultHapiSpec("BalancesAreChecked")
 				.given(
diff --git a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java
index 7502512189..cff1675a9d 100644
--- a/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java
+++ b/test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenUpdateSpecs.java
@@ -75,7 +75,6 @@ public class TokenUpdateSpecs extends HapiApiSuite {
 						nameChanges(),
 						keysChange(),
 						validatesAlreadyDeletedToken(),
-						validatesMissingRef(),
 						treasuryEvolves(),
 						deletedAutoRenewAccountCheckHolds(),
 						renewalPeriodCheckHolds(),
@@ -85,6 +84,7 @@ public class TokenUpdateSpecs extends HapiApiSuite {
 						tokensCanBeMadeImmutableWithEmptyKeyList(),
 						updateHappyPath(),
 						validatesMissingAdminKey(),
+						validatesMissingRef(),
 				}
 		);
 	}
@@ -148,6 +148,10 @@ public class TokenUpdateSpecs extends HapiApiSuite {
 				.given(
 						cryptoCreate("payer")
 				).when().then(
+						tokenUpdate("0.0.0")
+								.payingWith("payer")
+								.signedBy("payer")
+								.hasKnownStatus(INVALID_TOKEN_ID),
 						tokenUpdate("1.2.3")
 								.payingWith("payer")
 								.signedBy("payer")