EntityId implements Serializable { public static EntityId of(AccountID accountID) { return of(accountID.getShardNum(), accountID.getRealmNum(), accountID.getAccountNum(), EntityTypeEnum.ACCOUNT); } EntityId(Long shardNum, Long realmNum, Long entityNum, Integer type); static EntityId of(AccountID accountID); static EntityId of(ContractID contractID); static EntityId of(FileID fileID); static EntityId of(TopicID topicID); static EntityId of(TokenID tokenID); static EntityId of(String entityId, EntityTypeEnum type); static EntityId of(long entityShard, long entityRealm, long entityNum, EntityTypeEnum type); String entityIdToString(); Entities toEntity();  }
@DisplayName("Convert String to EntityId") @Test void ofStringPositive() { EntityTypeEnum type = EntityTypeEnum.ACCOUNT; assertThat(EntityId.of("0.0.1", type)).isEqualTo(EntityId.of(0, 0, 1, type)); assertThat(EntityId.of("0.0.0", type)).isNull(); }